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