import std.stdio, std.algorithm, std.array, std.string, std.math, std.conv;

void main() {
  auto s = map!(x => x.to!int)(readln.chomp.split);
  int n = s[0], a = s[1], b = s[2];

  int res = 0;
  foreach (i; 1 .. n + 1) {
    auto t = i.to!(dchar[]);
    int sum = 0;
    foreach (j; 0 .. t.length) {
      sum += t[j] - '0';
    }
    if (a <= sum && sum <= b) res += i;
  }
  writeln(res);
}
