function main(input) {
  let args = input.split(/\s/);
  let result = 0;
  for (let i = 0;i <= args[0];i++) {
    let sum = 0;
    for (let j = 0;j < ((i + '').length);j++) {
      sum += ((i + '')[j]) * 1;
    }
    if (sum >= args[1] && sum <= args[2]) {
      result += i;
    }
  }
  console.log(result);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));