#include <bits/stdc++.h>
int pw(int n) {
  if (n == 0) {
    return 1;
  }
  int i;
  int ans = 1;
  for (i = 0; i < n; i++) {
    ans *= 10;
  }
  return ans;
}
int main(void) {
  int N, A, B;
  scanf("%d %d %d", &N, &A, &B);
  int n;
  int ans = 0;
  for (n = 1; n <= N; n++) {
    int number = n;
    int digit = 0;
    while (number != 0) {
      number = number / 10;
      ++digit;
    }
    int i;
    int sum = 0;
    for (i = 0; i < digit; i++) {
      sum += (n / pw(i)) % 10;
    }
    if (sum >= A && sum <= B) {
      ans += n;
    }
  }
  printf("%d\n", ans);
  return 0;
}
