
"use strict"

const main =(input)=>{
  const array =input.split(" ")
  const N = array[0]-0
  const A = array[1]-0
  const B = array[2]-0
  
  let result = 0;

  for (let i=0; i<=N; i++){
   let sum= i.toString().split("").reduce( (a,b)=>{(a-0)+(b-0)} )
    if (A<=sum && B>=sum) result+=i ;
  }
  console.log(result);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))