function Main(input) {
  input = input.split(" ");
  var count = 0;
  for(var i=1;i<=input[0];i++){
    var tmp=0;
    for(var j of i.toString()){
      tmp+=Number(j);
    }
    if((input[1]<=tmp)&&(input[2]>=tmp)){
      count++;
    }
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));

console.log(count);