#include #include #include #include #include using namespace std; int main() { int n; cin >> n; vector h(n); for (int i = 0; i < n; ++i) cin >> h[i]; int maxh = *max_element(h.begin(), h.end()); int ans = count(h.begin(), h.end(), maxh); cout << ans << endl; return 0; }