n=int(input()) heightlist=[] height=input() heightlist=height.split(" ") heightlist.sort() print(heightlist.count(heightlist[n-1]))