module Main where

import Data.List
import Control.Monad
import Debug.Trace
 
readTuple :: Read a  => IO (a, a)
readTuple = do
    [f, s] <- readLs
    pure (f, s)

readLs :: Read a => IO [a]
readLs = fmap read . words <$> getLine

solve :: [Int] -> Int
solve hs = foldr (\cs acc -> if cs then acc + 1 else acc) 0 $  fmap inner $ zip [0..] hs
    where
        inner (0, value) = True
        inner (index, value) = all (<= value) $ take index hs


main = do
    _ <- getLine
    hs <- readLs
    print $ solve hs


