"use strict"

function calc(n) {
  let sum = 0;
  while(n>0){
    sum += n%10;
    n = Math.floor(n/10,10);
  }
  return sum;
}

function Main(input) {
  input = input.trim().split(' ');
  const n = input[0];
  const a = input[1];
  const b = input[2];

  let ans = 0;
  for(let i=1; i<=n; ++i){
    let o = calc(i);
    if(a<=o && o<=b) ans+=i;
  }

  console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));