toInt :: (String -> Int)
toInt x = read x ::Int

getInts = do
  x <- getLine
  let y = (map$toInt)$words x
  return y

findMt xs mx
  | xs == [] = 0
  | (xs !! 0) >= mx = 1 + findMt (tail xs) (xs !! 0)
  | (length xs) > 0 = findMt (tail xs) mx
  | otherwise = 0

main :: IO ()
main = do
  n <- getLine
  an <- getLine
  let anIntList = map toInt (words an)
  print $ findMt anIntList 0
