let () =
  let n = Scanf.scanf "%d" (fun n -> n) in
  let t = Scanf.scanf " %d %d" (fun t a -> (a - t) * 1000) in
  let hs =
    Array.init n (fun _ -> Scanf.scanf " %d" (fun h -> abs ((8 * h) + t)))
  in
  let _, ans, _ =
    Array.fold_left
      (fun (ind, ans, min_h) h ->
        if min_h < h then (ind + 1, ans, min_h) else (ind + 1, ind, h) )
      (1, 1, hs.(0))
      hs
  in
  Printf.printf "%d\n" ans
