'use strict';

let execute = input => {
  const [N, A, B] = input.split(' ').map(str => +str);
  let ans = 0;
  for (let i = 1; i <= N; i++) {
    const sum = String(i).split('').reduce((sum, el) => sum += +el, 0);
    if (sum >= A && sum <= B) ans += i;
  }
  return ans;
};

function Main(input) {
  console.log(execute(input));
}

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