main = do
  [n, x] <- map read . words <$> getLine :: IO [Int]
  ls <- map read . words <$> getLine :: IO [Int]
  print $ f 1 0 x ls

f :: Int -> Int -> Int -> [Int] -> Int
f answer d x ls
  | ls == [] = answer
  | d + head ls <= x = f newAns newD x newLs
  | otherwise = answer
  where
    newAns = answer + 1
    newD = d + head ls
    newLs = tail ls
