main :: IO ()
main = do
  [n,x] <- map (read :: String -> Int) . words <$> getLine
  ln <- map (read :: String -> Int) . words <$> getLine
  print $ ans x ln

ans :: Int -> [Int] -> Int
ans x = length . filter (<= x) . scanl1 (+) . (0:)