let n, x = Scanf.scanf " %d %d" @@ fun a b -> a, b
let ls = Array.init n @@ fun _ -> Scanf.scanf " %d" (+) 0
let d = ref 0
let _ = Array.iteri (fun i l -> if !d <= x then d := !d + l else (Printf.printf "%d\n" i; exit 0)) ls; Printf.printf "%d\n" @@ if !d <= x then n + 1 else n