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())
count = 0

for i in range(n):
  check = (i+1)//10000 + (i+1)//1000 + (i+1)//100 + (i+1)//10 + (i+1)%10
  if check >= a:
    if check <= b:
      count += (i+1)
      print (i+1)
      
print(count)
n, a, b = map(int, input().split())
count = 0

for i in range(n):
  sum = 0
  check = i + 1
  while (check > 0):
    sum = sum + check % 10
    check = check // 10
  
  if sum >= a:
    if sum <= b:
      count += (i+1)
      
print(count)