"use strict";

/**
 * @see https://practice.contest.atcoder.jp/tasks/practice_1
 * @param  {string} input
 * @returns {string}
 */
var main = function(input) {
    const digits = (n) => {
        return n.toString()
            .split("")
            .reduce((a, b) => a + b);
    }

    const params = input.split(" ").map(x => parseInt(x));
    const N = params[0];
    const A = params[1];
    const B = params[2];

    return [...Array(N).keys()]
        .map(x => x + 1)
        .filter(x => {
            const d = digits(x);
            return d >= A && d <= B;
        }).reduce((a, b) => a + b, 0);
};

const output = main(require("fs").readFileSync("/dev/stdin", "utf8"));
console.log(output); // console.log outputs with trailing new line!
