solve :: Int -> [Int] -> Int
solve current [] = 0
solve current (x:xs) = count + solve (max current x) xs
  where count = if x >= current then 1 else 0

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