open System

[<EntryPoint>]
let main argv =
  let xs = Console.ReadLine().Split(' ') |> Array.map int in
  let n = xs.[0] in
  let a = xs.[1] in
  let b = xs.[2] in
  let digitSum x =
    x
    |> string
    |> Seq.sumBy (fun c -> int c - int '0') in
  
  [1..n]
  |> Seq.sumBy (fun x -> if (digitSum x >= a) && (digitSum x <= b) then x else 0)
  |> Console.WriteLine
  0
