import java.util.*

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

        println((1..n).asSequence().filter{it.toString().toCharArray().map { c -> c.toString().toInt() }.sum() in a..b }.sum())
    }
}
