#!/bin/python3 import sys n = int(input().strip()) height = [int(height_temp) for height_temp in input().strip().split(' ')] height.sort() tallest = height[len(height)-1] print(height.count(tallest))