object Main extends App {

  val Array(n, a, b) = io.StdIn.readLine.split(" ").map(_.toInt)

  val ans = (1 to n).par.foldLeft(0)( (acc,i) => {
    val sum = (1 to 4).foldLeft((i,0))( (acc,_) => {
      (acc._1 / 10, acc._2 + (acc._1 % 10))
    })._2
    if(a <= sum && sum <= b ) acc + i else acc
  })

  println(ans)
}