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())

SUM=0
for i in range(N):
    list_N = list(str(i))
    sum_N = sum(list(map(int, list(list_N))))
    
    if sum_N >= A:
        if sum_N <= B:
            SUM += i

print(SUM)
  








N, A, B = map(int, input().split())

SUM=0
for i in range(N+1):
    list_N = list(str(i))
    sum_N = sum(list(map(int, list(list_N))))
    
    if sum_N >= A:
        if sum_N <= B:
            SUM += i

print(SUM)