import Data.Bits
import Data.List
import Data.Foldable(foldlM)
import Data.Maybe(fromJust)
import Control.Monad
import Data.Array as A ((!),accumArray)
import Data.Graph
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Unboxed.Mutable as VM
import Control.Monad.ST
import Data.Maybe (fromMaybe)
import qualified Data.ByteString.Char8 as BS
import Debug.Trace

toTuple :: [a] -> (a,a)
toTuple (x:y:_) = (x,y)
toTuple _ = undefined

getInt :: IO Int
getInt = fst . fromJust. BS.readInt <$> BS.getLine

getIntList :: IO [Int]
getIntList = unfoldr (BS.readInt . BS.dropWhile (== ' ')) <$> BS.getLine

getLineB :: (Read a) => IO [a] --直接入力
getLineB = map (read.BS.unpack) . BS.words <$> BS.getLine

mod' :: Int -> Int
mod' n = n `mod` 1000000007

f :: [Int] -> Int -> [Int]
f [] _ = [0]
f [_] s = [s]
f (x:y:xs) s = if x <= y then s : (f (y:xs) (s+1)) else s : (f (y:xs) 0)

main :: IO ()
main = do
  _ <- getLine
  hs <- getIntList
  print $ maximum $ f (reverse hs) 0
