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 = list(map(int, input().split()))
sum = 0
for i in range(1, n+1):
    sub = i % 10
    for j in range(1, 4):
        sub += (i // (10**j))
        if a <= sub <= b:
            sum += sub
print(sum)
n, a, b = list(map(int, input().split()))
ans = 0
for i in range(1, n+1):
    sum = 0
    for j in str(i):
        sum += int(j)
    if a <= sum <= b:
        ans += i
print(ans)
