module Main (main) where

import qualified Data.ByteString.Char8 as C8
import Data.List
import Data.Maybe

main :: IO ()
main = do
  [n] <- readInts
  readInts >>= print . solve n

solve :: Int -> [Int] -> Int
solve n = g . foldr f (0, [], 0)
  where
    f x (m, n, c)
      | m >= x = (x, n, c+1)
      | otherwise = (x, c:n, 0)
    g (_, n, c) = maximum (c:n)

-- utils
readInts :: IO [Int]
readInts = map (fst . fromJust . C8.readInt) . C8.words <$> C8.getLine