#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 int n, height[100001]; cin>>n; long long int max=0, count=0; for(long long int i=0;i<n;i++) { cin>>height[i]; if(height[i]>max) { max=height[i]; count=1; } else if(height[i]==max) count++; } cout<<count; return 0; }