import Foundation
func toTuple<T>(_ args: [T]) -> (T, T, T) { (args[0], args[1], args[2]) }
func readInts() -> [Int] { readLine()!.split(separator: " ").map { Int($0)! } }

let (n, a, b) = toTuple(readInts())
let ans = (1...n).map {
  var sum = 0
  for c in String($0) { sum += Int(String(c))! }
  if sum >= a && sum <= b { return $0 }
  else { return 0 }
}.reduce(0, +)
print(ans)