declare function require(x: string): any;

const main = (input: string[][]) => {
    const n: number = Number(input[0][0]);
    const a: number = Number(input[0][1]);
    const b: number = Number(input[0][2]);
    let count = 0;
    for (let i = 1; i <= n; i++) {
        let digitSum = String(i)
            .split('')
            .map(Number)
            .reduce((a, b) => a + b);
        if (a <= digitSum && digitSum <= b) count++;
    }
    console.log(Number);
};

const whole_input: string = require('fs').readFileSync('/dev/stdin', 'utf8');

main(whole_input.split('\n').map((s: string) => s.split(' ')));
