import qualified Data.ByteString.Char8 as C
import Data.List


r' :: IO [Int]
r'  = unfoldr (C.readInt . C.dropWhile (==' ')) <$> C.getLine

main :: IO ()
main = do
    [n,x] <- r'
    ls <- r'
    print $ solve x 1 0 ls

solve x ac d [] = ac
solve x ac d (l:ls)
    | d+l > x = ac
    | otherwise = solve x (ac+1) (d+l) ls