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 h -> abs @@ 1000 * (t - a) - 6 * h, i + 1
let _ = Array.fold_left min (max_int, -1) hs |> snd |> Printf.printf "%d\n"