import Foundation

var arr = readLine()!.split(separator: " ").map {Int($0)!}
let n = arr[0]
let a = arr[1]
let b = arr[2]

var count = 0
var final = 0

for num in 0...n {
    var x = num
    var sum = 0
    while x > 0{
        sum += x%10
        x /= 10
    }
    
    if sum >= a && sum <= b {
        //        print(num,sum)
        count += 1
        final += num
    }
}

print(final)