-- ABC124 B problem
import Control.Monad
import Control.Applicative
import Data.List

toInt :: String -> Int
toInt x = read x :: Int

getInts :: IO [Int]
getInts = do
  x <- getLine
  let y = (map $ toInt) $ words x
  return y

check :: [Int] -> Int -> Int -> Int
check x m n =
  if (null x) then n
  else
    if (head x) >= m then check (tail x) (head x) n
    else check (tail x) m (n-1)

main :: IO ()
main = do
  rd <- getLine
  let n = read rd :: Int
  h <- getInts
  print (check h (head h) n)