
object Main extends App {
	val temp = scala.io.StdIn.readLine.split(" ").map(_.toInt)
	var result = 0

	def f(x: Int): Int = {
		var temp = x/10
		var z = x%10

		while(temp != 0){
			z = z + temp%10
			temp = temp / 10
		}
		z
	}

	for(i<-1 to temp(0)){
		val t = f(i)
		if(temp(1) <= t && t <= temp(2)) result = result + i
	}

	println(result)
}