import java.util.*

val sc = Scanner(System.`in`)
val N = sc.nextInt()
val A = sc.nextInt()
val B = sc.nextInt()

fun main(args: Array<String>) {
    (1..N).filter {
        sumOfDigits(it) in A..B
    }.sum().let(::println)
}

fun sumOfDigits(n0: Int): Int {
    var n = n0
    var result = 0
    while (n != 0) {
        result += n % 10
        n /= 10
    }
    return result
}
