#!/bin/python3 import sys n = int(input().strip()) height = [int(height_temp) for height_temp in input().strip().split(' ')] counter = 0 tallest = height[0] for i in range(n): if height[i] == tallest: counter += 1 elif height[i] > tallest: tallest = height[i] counter = 1 print(counter)