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

void main() {
    int N, A, B;
    readf("%d %d %d\n", &N, &A, &B);
    iota(N+1).filter!(i => i.to!string.map!(pipe!(to!string, to!int)).sum.pipe!(s => A <= s && s <= B)).sum.writeln;
}

