main :: IO ()
main = print . solve 0 0 . map read . tail . words =<< getContents

solve :: Int -> Int -> [Int] -> Int
solve n m (x:y:xs) | x >= y = solve n (m + 1) (y:xs)
                   | otherwise = solve (max n m) 0 (y:xs)
solve n m _ = max n m
