#include
using namespace std;
int Max_count(const vector &a )
{
int result = 0;
for (int i = 0; i < a.size();++i )
if (a[i] == *max_element(a.begin(), a.end()))
result ++;
return result;
}
int main()
{
int n;
cin >> n;
vector a(n);
for (int i = 0; i < n; ++i)
cin >> a[i];
cout << Max_count(a);<br>}