import java.util.*

fun main(args: Array<String>) {
  val sc = Scanner(System.`in`)
  val n = sc.nextInt()
  val a = sc.nextInt()
  val b = sc.nextInt()

  var count = 0
  for (i in 1..n) {
    val sum = i.toString().toCharArray().map { it.toInt() - '0'.toInt() }.sum()
    if (a <= sum && sum <= b) count += i
  }

  println(count)
}
