module Main where

import           Control.Monad
import           Data.List
import           Data.Ord
import           Data.List.Split
import           Data.Array.IO
import qualified Data.Vector.Unboxed           as V

main :: IO ()
main = do
  _ <- getLine
  hs <- map read . words <$> getLine :: IO [Int]
  print $ 1 + f hs 0
  where
    f [] _ = 0
    f [a] m = if a > m then 1 else 0
    f (a:b:hs) m | m == 0 = f (a:b:hs) a
                 | b >= a && b >= m = 1 + f hs m
                 | otherwise = f (b:hs) (max b m)
