#abc083b. [abc083_b]Some Sums

[abc083_b]Some Sums

Problem Statement

Find the sum of the integers between 11 and NN (inclusive), whose sum of digits written in base 1010 is between AA and BB (inclusive).

Constraints

  • 1leqNleq1041 \\leq N \\leq 10^4
  • 1leqAleqBleq361 \\leq A \\leq B \\leq 36
  • All input values are integers.

Input

Input is given from Standard Input in the following format:

NN AA BB

Output

Print the sum of the integers between 11 and NN (inclusive), whose sum of digits written in base 1010 is between AA and BB (inclusive).


Sample Input 1

20 2 5

Sample Output 1

84

Among the integers not greater than 2020, the ones whose sums of digits are between 22 and 55, are: 2,3,4,5,11,12,13,142,3,4,5,11,12,13,14 and 2020. We should print the sum of these, 8484.


Sample Input 2

10 1 2

Sample Output 2

13

Sample Input 3

100 4 16

Sample Output 3

4554