import qualified Data.ByteString.Char8 as B
import qualified Data.Vector.Unboxed as VU
import Data.Char

step (a,b,c) x
    | x <= a = (x, max b (c+1), c+1)
    | otherwise = (x, max b c, 0)

main = do
    n <- readLn :: IO Int
    xs <- VU.unfoldrN n (B.readInt . B.dropWhile isSpace) <$> B.getLine
    let (_,res,_) =  VU.foldl' step (VU.head xs,0,0) (VU.tail xs)
    print res