let n, t, a = Scanf.scanf " %d %d %d" @@ fun a b c -> a, b, c
let hs = Array.init n @@ fun i -> Scanf.scanf " %d" @@ fun a -> a, i + 1
let f x = abs @@ 1000 * t - 6 * x - 1000 * a
let _ = Array.fold_left (fun m (h, i) -> min m (f h, i)) (max_int, -1) hs |> snd |> Printf.printf "%d\n"