import scala.io.StdIn

object Main {
  def main(args: Array[String]) = {
    val array = StdIn.readLine.split(" ").map(_.toInt)
    var count = 0
    
    for(a <- 0 to array(0)){
      val b = (a % 10 + a / 10 )
      if(array(1) <= b && b <= array(2) ) count += a
    }
    println(count)
  }
}