main = do
  nIn <- getLine
  hlsIn <- getLine
  let
    n = read $ head $ words nIn :: Int
    hls = map read $ words hlsIn :: [Int]
    func ls m ret
      | ls == []     = ret
      | head ls >= m = func (tail ls) (head ls) (ret+1)
      | otherwise    = func (tail ls) m ret
    in
      putStrLn $ show $ func hls 0 0
