object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val N, A, B = sc.nextInt()
  val result = 1.to(N).map { i =>
    val sum = i.toString.split("").map(_.toInt).sum
    if (A <= sum && sum <= B) i else 0
  }.sum
  println(result)
}
