import scala.io.StdIn

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