function myout(text){console.log(text);}//standard output
function Main(input) {
	//input = parseInt(input.trim());
	//input = input.trim().split(" ");
	//input = input.trim().split("\n");
	input = input.trim().split(" ").map((a)=>Number(a));
	//input = input.trim().split("\n").map((a)=>Number(a));
  var N = input[0];
  var A = input[1];
  var B = input[2];
  var output = 0;
  for(var i = 1; i <= N; i++){
    var tmp = i.toString().split("");
    var digitSum = 0;
    for(var j = 0; j < tmp.length; j++){
      digitSum += parseInt(tmp[j]);
    }
    if(digitSum >= A && digitSum <= B){
       output += i;
       }
  }
  myout(output);
}

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