function Main(input) {
  const args = input.split(' ');
  const N = parseInt(args[0], 10),
        A = parseInt(args[1], 10),
        B = parseInt(args[2], 10);

  const nums = Array.from(new Array(N), (v,i) => i++).filter((i)=>{
    var n =i.toString().split("").reduce((p,c) => parseInt(p) + parseInt(c));
    return (n>=A && n<=B);
  });

  console.log(nums.reduce((p,c)=>p+c));

}


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