input()
arr = [int(i) for i in input().split()]
print(arr.count(max(arr)))