# Enter your code here. Read input from STDIN. Print output to STDOUT raw_input() heights = [int(i) for i in raw_input().split()] print heights.count(max(heights))