function main(argString) {
  var count = 0;
  var split = argString.split(' ');
  var N = Number(split[0]), A = Number(split[1]), B = Number(split[2]);
  for (var i = 1; i <= N; i++) {
    var num = ('' + i).split('').reduce((a, b) => Number(a) + Number(b));
    if (A <= num && num <= B) count += i;
  }
  console.log(count);
}

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