function Main(input) {
  input = input.split(" ");

  var N = ~~input[0];
  var A = ~~input[1];
  var B = ~~input[2];

  var Problem = function(){
    this.N = N;
    this.A = A;
    this.B = B;
  }

  Problem.prototype = {
    procedure: function(){
      var count = 0;
      for(var i=1; i<=N; i++){ // 1, 2, 3, 4, 5....1234,1235,1236...
        var numArray = String(i).split("").map(x => ~~x); //1234 => [1,2,3,4]
        var sum=0;
        for(eachNum of numArray){
          sum = sum+eachNum; // 1+2+3+4
        }
        if(this.A <= sum && sum <= this.B){
          //console.log(sum);
          count=count+i; // count=0+1234;
        }
      }
      return count;
    }
  }

  var problem = new Problem();
  console.log(problem.procedure());

  // console.log('%d %d',N,Q);
}


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