open System

let N,X=stdin.ReadLine().Split()|>Array.map int|>fun c -> int c.[0],int c.[1]
let L =stdin.ReadLine().Split()|>Array.map int
[<EntryPoint>]
let main argv =
    let D=Array.zeroCreate (N+1)
    for i in [0..N-1] do D.[i+1] <- D.[i]+L.[i]
    D
    |>Seq.sumBy(fun c -> if c<=X then 1 else 0)
    |>stdout.WriteLine
    0