
function Main(input) {
    var N = parseInt(input[0], 10);
    var A = parseInt(input[1], 10);
    var B = parseInt(input[2], 10);

    var result = 0;

    for (var i = 1; i <= N; i++) {
        var numStr = i.toString();
        var numList = numStr.split('');
        var sum = 0;
        for (var j = 0; j < numList.length; j++) {
            sum += parseInt(numList[j], 10);
        }
        if (sum >= A && sum <= B) {
            result += i;
        }
    }
    console.log(result);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));