import std.stdio;
import std.conv;
import std.string;
import std.math;
import std.random;
import std.range;
import std.algorithm;
import std.functional;
import core.bitop;
import std.bigint;
import std.typecons;
import std.container;

void main()
{
    auto input = readln.split.to!(int[]);
    auto N = input[0], A = input[1], B = input[2];

    int result;
    foreach (e; 1 .. N + 1)
    {
        auto s = e.to!(string).map!(a => a.to!int - '0').sum;
        if (A <= s && s <= B)
            result += e;
    }
    result.writeln;
}
