import scala.io.StdIn

object Main extends App {
  val a = StdIn.readLine().split(' ').map(_.toInt)
  
  val result = (0 to a(0)).foldLeft(0){ (acc ,i) =>
    val r = i.toString.foldLeft(0)( (acc, c) => Integer.parseInt(c.toString) + acc)
    acc + (if(a(1) <= r && r <= a(2)) i else 0)
  }
  
  println(result)
  
}