import Data.List
import Data.Ord
import Data.Char
import Data.Ratio
import Data.Maybe

main = do
  n  <- readLn :: IO Int
  hs <- map (read::String->Int) . words <$> getLine
  print $ length $ elemIndices True $ zipWith(==) hs (scanl1 max hs)