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