function Main(input) {
  var In = input.split(' ');
  var N = In[0];
  var A = In[1];
  var B = In[2];
  var sum = 0;
  
  for(var i = 1; i <= N; i++){
    var str = String(i);
    var length = str.length;
    var strSum = 0;
    
    for(var j = 0; j < length; j++){
      var num = Number(str[j]);
      strSum += num;
    }
    
    if((A <= strSum) && (strSum <= B)){
      sum += strSum;
    }
  }
  
  console.log(sum);
  
}

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