#!/bin/python import sys n = int(raw_input().strip()) height = map(int,raw_input().strip().split(' ')) max=0 count=0 for i in range(0,len(height)): if height[i]>max: max=height[i] else: max for i in range(0,len(height)): if max==height[i]: count+=1 print count