object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n, a, b = sc.nextInt()
  val ans = (1 to n).filter{ x =>
    val sum = x.toString.map(_.toString.toInt).sum
    a <= sum && sum <= b
  }.sum
  println(ans)
}
