import Control.Monad

getInteger :: IO Integer
getInteger = read <$> getLine

main :: IO()
main = do
  n <- readLn
  (a:as) <- replicateM n $ getInteger
  print $ slv as a 1 1

slv :: [Integer] -> Integer -> Integer -> Integer -> Integer
slv [] _ nowclrNum clrNum | nowclrNum > clrNum = nowclrNum
                          | otherwise = clrNum
slv (a:as) val nowclrNum clrNum | a <= val = slv as a (1 + nowclrNum) clrNum
                                | nowclrNum > clrNum = slv as a 1 nowclrNum
                                | otherwise = slv as a 1 clrNum 
