function main(input) {
	const args = input.split(' ').map((n) => parseInt(n, 10));
  	const N = args[0],
          A = args[1],
          B = args[2]

    let total = 0;
  	
  	for (let i = 1; i <= N; i++) {
    	sum = findSumOfDigits(i);
      	if (A <= sum && sum <= B) {
        	total += i
        }
    }
  
  	console.log(total);
}

function findSumOfDigits(n) {
  	let sum = 0;
	while(n > 0) {
      sum += n % 10;
      n = n / 10;
    }
  	return sum;
}

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