const main = input => {
  'use strict';
  let args = String(input).split(' ');
  const N = parseInt(args[0], 10),
    A = parseInt(args[1], 10),
    B = parseInt(args[2], 10);
  let n1 = num => A <= num;
  let n2 = num => B >= num;
  let ans = [...Array(N)]
    .filter((val, index) => {
      let num = String(index).split('');
      let n = num.reduce((pre, cu) => pre + Number(cu), 0);
      return n1(n) && n2(n) ? true : false;
    })
    .reduce((pre, cu) => pre + cu, 0);
  console.log(ans);
};

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