import Control.Monad
import Data.List

main = do
    [n,x] <- map read . words <$> getLine :: IO [Int]
    ln <- map read . words <$> getLine :: IO [Int]
    print $ length $ filter (<=x) (scanl (+) 0 ln)
