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

  let ans = 0;
  for(let i=1; i<=n; ++i){
    let o = i;
    let calc = 0;
    while(o>0){
      calc += o%10;
      o = Math.floor(o/10);
    }

    if(a<=calc && calc<=b){
      ans += i;
    }

  }

  console.log(ans);
}

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