#include <cmath> #include <cstdio> #include <vector> #include <iostream> #include <algorithm> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ long long n,h,sum=1,max=-1; cin>>n; while(n--){ cin>>h; if(max==h){ sum++; } else if(max<h){ max=h; sum=1; } } cout<<sum; return 0; }