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())
ans = 0
for i in range(N+1):
    tmp = sum([int(j) for j in str(i)])
    if(A <= tmp <= B):
        ans += 1
print(ans)
N, A, B = map(int, input().split())
ans = 0
for i in range(N+1):
    tmp = sum([int(j) for j in str(i)])
    if(A <= tmp <= B):
        ans += i
print(ans)
