#!/bin/python n = int(raw_input().strip()) height = [int(x) for x in raw_input().strip().split(' ')] print height.count(max(height))