function main(input) {
    'use strict'
    const N = parseInt(input.split(' ')[0], 10);
    const A = parseInt(input.split(' ')[1], 10);
    const B = parseInt(input.split(' ')[2], 10);

    let total = 0;
    for (let i = 1; i <= N; i++) {
        let ketaTotal = 0;
        for (let j = 0; j < String(i).length; j++) {
            ketaTotal += parseInt(String(i).substr(j,1),10)
        }

        if(ketaTotal >= A && ketaTotal <= B) {
            total += i;
        }
    }
  console.log(total);
}

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