[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

[<EntryPoint>]
let main _ =
    let [n;x] = reads int
    let ls = reads int
    Seq.scan (+) 0 ls
    |> Seq.takeWhile (fun y -> y <= x)
    |> Seq.length
    |> printfn "%i"
    0