process.stdin.resume();
process.stdin.setEncoding('utf8');


function splitDegistSum(number)
{
    var sum = 0, num = number;
    while (num > 0) {
        sum += num % 10;
        num = num / 10;
    }
    
    return parseInt(sum);
}

function Main(input) {
    var inputs = input.split(" ").map(e => parseInt(e));
    
    var N = inputs[0],
        A = inputs[1],
        B = inputs[2],
        result = 0;
        
    for (var i = 1; i <= N; i++) {
        var sum = splitDegistSum(i);
        if (A <= sum && sum <= B) {
            result += i;
        }
    }
    
    console.log(result);
    
}

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