Scanf.scanf "%d %f %f" (fun n t a ->
    let h = Array.init n (fun _ -> Scanf.scanf " %f" (fun h -> h)) in
    let rec loop i dist di =
        if i = n then di + 1 else
            let v = t -. h.(i) *. 0.006 in
            let k = abs_float (a -. v) in
            if k < dist then loop (i + 1) k i
                        else loop (i + 1) dist di
    in
    loop 0 10000. 0 |> Printf.printf "%d\n"
)