object Main extends App {

  def rec(m:Int, t:Int):Int = {
    if(m > 0) rec(m/10, t + (m%10))
    else t
  }

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

  val ans = (1 to n).foldLeft(0)( (acc,i) => {
    val sum = rec(i, 0)
    if(a <= sum && sum <= b ) acc + i else acc
  })

  println(ans)
}
