# Enter your code here. Read input from STDIN. Print output to STDOUT n=int(raw_input()) arr=map(int,raw_input().split()) b=max(set(arr)) c=arr.count(b) print c