import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

void main() {
    auto nab = readints;
    int n = nab[0], a = nab[1], b = nab[2];

    int ans = 0;
    for (int i = 1; i <= n; i++) {
        int s = 0;
        int x = i;
        while (x > 0) {
            s += x % 10;
            x /= 10;
        }
        if (a <= s && s <= b) ans += i;
    }
    writeln(ans);
}
