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