import java.io.InputStream
import java.io.PrintStream
import java.util.*

class Abc083B(
    val input: InputStream,
    val output: PrintStream
) {
    fun proc() {
        val sc = Scanner(input)
        val n = sc.nextInt() // 10,000
        val a = sc.nextInt() // 1 <= a <= 36
        val b = sc.nextInt()

        var sum = 0
        for (i in 1..n) {
            val input = i.toString().toCharArray().map { it.toString().toInt() }
            val subSum = input.sum()
            if (subSum in a..b) {
                sum += i
            }
        }
        output.print(sum)
    }
}

fun main(args: Array<String>) {
    Abc083B(System.`in`, System.out).proc()
}
