object Main {
  def main(args: Array[String]): Unit = {
    val in = readLine.split(" ").map(_.toInt)
    val N = in(0)
    val A = in(1)
    val B = in(2)

    var count = 0
    for(i <- 1 to N){
      val deg = i.toString.length - 1
      val array = (0 to deg).map{idx => i.toString.charAt(idx).toInt}.toArray
      if (A <= array.sum & array.sum <= B) count += N
    }

    print(count)

  }
}