import Control.Applicative

main = do
  [n, x] <- map (read::String -> Int) . words <$> getLine
  arr <- map (read::String -> Int) . words <$> getLine
  print $ length $ takeWhile (<= x) $ scanl (\acc x -> acc + x) 0 arr