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

solve :: Int -> Int -> [Int] -> Int
solve x t [] = x 
solve x t (h:hs) = if h >= t then solve (x+1) h hs else solve x t hs