import sys n = int(input().strip()) height = [int(height_temp) for height_temp in input().strip().split(' ')] tallest = max(height) print(sum(h == tallest for h in height))