fun main(args: Array<String>) {
    val (n,a,b)= readLine()!!.split(" ").map{ it.toInt() }
    (1..n).filter{
        (it.toString().toList().map{it.toString().toInt()}.sum() ) in a..b
    }.sum().let { println(it) }
}