let inline charToInt c = int c - int '0'

let ints = stdin.ReadLine().Split(' ') |> Array.map int
let n = ints.[0]
let a = ints.[1]
let b = ints.[2]

seq { 1..n } |> Seq.sumBy (fun x ->
    let sum = x |> (string >> Seq.sumBy charToInt)
    if a <= sum && sum <= b then
        x
    else
        0
    ) |> printfn "%A"
