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):
    s = 0
    for k in str(i):
        s += int(k)
    if a<=s and s<=b:
        ans += s
print(ans)
n,a,b=map(int,input().split())
ans = 0
for i in range(1,n+1):
    s = 0
    for k in str(i):
        s += int(k)
    if a<=s and s<=b:
        ans += i
print(ans)