#!/bin/python3 import sys n = int(input().strip()) height = [int(height_temp) for height_temp in input().strip().split(' ')] max = 0 output = [] for i in range(n): if height[i] > max: max = height[i] for x in height: if x == max: output.append(x) print(len(output))