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(lambda x:int(x),input().strip().split())
res = []

for i in range(1,n+1):
    tmp = sum(list(map(lambda x:int(x),list(str(i)))))
    if tmp>=a and tmp<=b:
        print("ok",tmp)
        res.append(i)
print(sum(res))


n,a,b = map(lambda x:int(x),input().strip().split())
res = []

for i in range(1,n+1):
    tmp = sum(list(map(lambda x:int(x),list(str(i)))))
    if tmp>=a and tmp<=b:
        res.append(i)
print(sum(res))

