import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Read as T

main :: IO ()
main = do
  let
    f :: [Int] -> (Maybe (Int, Int), Int)
    f = foldr step (Nothing, 0)
      where
        step :: Int -> (Maybe (Int, Int), Int) -> (Maybe (Int, Int), Int)
        step h (Nothing, m) = (Just (h, 0), m)
        step h (Just (h', l), m) | h' <= h   = (Just (h, l + 1), m)
                                 | otherwise = (Just (h, 0), l `max` m)
  n <- unsafeTextToInt <$> T.getLine :: IO Int
  hs <- map unsafeTextToInt . T.words <$> T.getLine :: IO [Int]
  print . (max <$> maybe 0 snd . fst <*> snd) . f $ hs

unsafeTextToInt :: T.Text -> Int
unsafeTextToInt s = case T.signed T.decimal s of
  Right (n, _) -> n
{-# INLINE unsafeTextToInt #-}
