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