fun main (args: Array<String>) {
	val (num1, num2, num3) = readLine()!!.split(" ").map(String::toInt)
	
	var num : Int
	var calc : Int
	var result : Int = 0
	var total : Int = 0
	
	for (i in 1..num1) {
		num = i
		
		while (num > 0) {
			calc = num % 10
			result += calc
			num = num / 10
			
		}
		
		if (result >= num2 && result <= num3) {
			total += i
			
		}
		result = 0
		
	}
	
	println("${total}")
	
}