
function sum_of_n(n){
    var ret = 0;
    while(n > 0){
        ret += (n%10);
        n /= 10;
        n = Math.floor(n);
    }
    return ret;
}

function Main(input){
    input = input.split(" ");
    var N = input[0], A = input[1], B = input[2], ans = 0, tmp;
    for(var i = 1; i <= N; ++i){
        tmp = sum_of_n(i);
        if(tmp >= A && tmp <= B) ans += i;
    }
    console.log(ans);
}

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