Find the sum of the integers between 1 and N (inclusive), whose sum of digits written in base 10 is between A and B (inclusive).
n, a, b = map(int,input().split())

y = 0
for i in range(n+1):
    x = 0
    j = i
    while j > 0:
        x += j % 10
        j /= 10
    if x >= a and x <= b:
        y += x
print(y)

n, a, b = map(int,input().split())

y = 0
for i in range(n+1):
    x = 0
    j = i
    while j > 0:
        x += j % 10
        j //= 10
    if x >= a and x <= b:
        y += i
print(y)
