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