function Main(input) {
  const [n, a, b] = input.split(" ").map(num => parseInt(num, 10))
  let result = 0
  for (let i = 1; i <= n; i++) {
    const str_n = i.toString()
    let sum = 0
    for (let j = 0; j < str_n.length; j++) {
      sum += parseInt(str_n[j], 10)
    }
    if (sum >= a && sum <= b) {
      result += i
    }
  }
  console.log(result)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))