import Data.List (tails)

main :: IO ()
main = getLine >> readInts >>= print . solve . reverse

readInts :: IO [Int]
readInts = map read . words <$> getLine

solve :: [Int] -> Int
solve = length . filter headHighest . init . tails

headHighest :: [Int] -> Bool
headHighest (h:hs) = all (h >=) hs
