main = do
  n <- getLine
  h <- map read . words <$> getLine
  putStrLn . show $ solve h

solve :: [Int] -> Int
solve h = count $ map calc (zip h [0..])
  where
    calc (hx, i) = null $ filter (\x -> hx < x) (take i h)

count [] = 0
count (x:xs) = (if x then 1 else 0) + count xs
