#include #include #include #include #include using namespace std; int main() { int n = 0; cin >> n; int height[n]; int max = 0; for (int i = 0; i < n; ++i) { cin >> height[i]; } for (int i = 0; i < n; ++i) { if (height[i] > max) { max = height[i]; } } int res = 0; for (int i = 0; i < n; ++i) { if (height[i] == max) { res++; } } cout << res; return 0; }