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).
input_line = input()
x, y, z = map(str, input_line.split())

print(x, y, z)
resultNum = 0

for i in range(int(x)):
  loopCnt = len(str(i))
  addNum = 0
  for j in range(loopCnt):
    addNum += int(str(i)[j])
  if int(y) <= addNum <= int(z):
    resultNum += i

print(resultNum)
input_line = input()
x, y, z = map(str, input_line.split())

resultNum = 0

for i in range(int(x)+1):
  loopCnt = len(str(i))
  addNum = 0
  for j in range(loopCnt):
    addNum += int(str(i)[j])
  if int(y) <= addNum <= int(z):
    resultNum += i

print(resultNum)