#!/bin/python import sys n = int(raw_input().strip()) height = map(int,raw_input().strip().split(' ')) tallest = 0 counter = 1 for i in height: if i == tallest: counter+=1 if i > tallest: tallest = i counter = 1 print counter