import "dart:io";

main(){
  List nab = stdin.readLineSync().split(" ").map((x) => int.parse(x)).toList();

  int n = nab[0];
  int a = nab[1];
  int b = nab[2];

  int ans = 0;
  for (int i = 1; i <= n; i++){
    int sum = 0;
    int tmp = i;
    while (tmp > 0){
      sum += tmp % 10;
      tmp ~/= 10;
    }
    if (a <= sum && sum <= b) ans += i;
  }
  print(ans);
}
