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