import sys n = int(input().strip()) a = [int(el) for el in input().strip().split()] a.sort() print(a.count(a[len(a)-1]))