function Main(input) {
  "use strict";
  const lines = input.split("\n");
  const line1 = lines[0].split(" ");

  const n = parseInt(line1[0], 10);
  const a = parseInt(line1[1], 10);
  const b = parseInt(line1[2], 10);

  var total = 0;
  var sum = 0;
  for (let i = 1; i <= n; i++) {
    const ns = i.toString().split("").map(s => +s)
    sum = 0;
    for (let k = 0; k < ns.length; k++) {
      sum += ns[k]
    }
    if (a <= sum && sum <= b) {
      total += i
    }

  }
  console.log(total)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
