import Data.List

solve :: [Int] -> Int -> Int -> Int -> Int
solve inList ite listNum result
 | listNum < ite                                        = result
 | (minimum (take ite inList)) == (inList !! (ite - 1)) = solve inList (ite + 1) listNum (result + 1)
 | otherwise                                            = solve inList (ite + 1) listNum result   

main = do
 n <- read <$> getLine :: IO Int
 pList <- map read . words <$> getLine :: IO[Int]
 print $ solve pList 1 n 0