import java.util.*

fun main(args: Array<String>) {
    val cin = Scanner(System.`in`)
    val N = cin.nextInt()
    val A = cin.nextInt()
    val B = cin.nextInt()

    val ans = (1..N).map {
        var sum = 0
        var tmp = it
        while (tmp > 0) {
            sum += (tmp % 10)
            tmp /= 10
        }
        if (A <= sum && sum <= B) it else 0
    }.sum()
    println(ans)
}