function Main(input){
  var list = input.split(" ");
  var cnt = 0;
  for(var i=1;i<=list[0];i++){
    var sum = 0;
    for(var j of (i+"").split("")){
      sum+=Number(j);
    }
    if(list[1]<=sum&&sum<=list[2])cnt+=i;
  }
  console.log(cnt);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));