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