let () = Scanf.scanf "%d\n%d %d\n" @@ fun n t a ->
  let hs = Array.init n @@ fun i -> Scanf.scanf "%d " @@ fun h -> i, h in
  Printf.printf "%d\n" @@ succ @@ fst @@
  Array.fold_left (fun (i, hi) (j, hj) ->
    if abs (1000 * a - 1000 * t + hi * 6) <= abs (1000 * a - 1000 * t + hj * 6)
    then (i, hi)
    else (j, hj)) hs.(0) hs

