#include<iostream>using namespace std;int main(){ int n,i,max=-10000,t,j; cin>>n; while (j<=n) { cin>>i; j++; if (i>max) { max=i; t=1; } if (i=max) t=t+1; } cout<<t<<endl; return 0;}