function Main(input) {
  input = input.split('\n')

  let ans = 0

  const args = input[0].split(' ')
  const min = Number(args[1])
  const max = Number(args[2])

  const num = Number(args[0])

  for (let i = 1; i <= num; i++) {
    const splitNum = String(i).split('')

    let sum = 0
    splitNum.forEach(data => {
      sum = sum + Number(data)
    })

    if (min <= sum && sum <= max) ans = ans + i
  }

  console.log(ans)

}

Main(require("fs").readFileSync("/dev/stdin", "utf8"))