"use strict";

const splitNum = (num) => {
    var sum = 0;
    while(num > 0){
        sum += num % 10;
        num /= 10;
    }
    return parseInt(sum);
}


const Main = (input) => {
    var input = input.split(' ');
    var N = parseInt(input[0]);
    var min = parseInt(input[1]);
    var max = parseInt(input[2]);

    var total = 0;
    var sum = 0;


    for (let i = 1; i <= N; i++) {
        var sum = splitNum(i);
        if(sum <= max && sum >= min){
            total += i;
        }
    }

    console.log(total);



}

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