function main(input) {
  const args = input.split(' ');
  const N = parseInt(args[0]);
  const A = parseInt(args[1]);
  const B = parseInt(args[2]);
  
  var nums = Array.from(new Array(N), (v, i) => ++i).filter((i) => {
  	var n = i.toString.split('').reduce((p, c) => p + parseInt(c), 0);
    return (A <= n && n <= B);
  });
  
  console.log(nums.reduce((p, c) => p + c, 0));
}

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