let _ = read_line()
let (t,a) = match read_line() |> Str.split (Str.regexp " ") with
| [t;a]->(int_of_string t,int_of_string a)
| _ -> assert false
let hs = read_line() |> Str.split (Str.regexp " ") |> List.map int_of_string

let _ =
  let (v,p,_) = List.fold_left (fun (v,p,i) h  ->
    let t = t*1000 - h*6 in
    let v1 = abs (t - a*1000) in
    (*Printf.printf "i=%d v1=%d v=%d\n" i v1 v;*)
    if v1 <= v then (v1,i,i+1) else (v,p,i+1)
  ) (50000000000,-1,1) hs in
  Printf.printf "%d\n" p
