#include #include using namespace std; int main(){ int n, temp, answer, counter = 0; cin >> n; for (int i = 0; i < n; ++i){ cin >> temp; if (temp > answer){ answer = temp; counter = 1; } else if (temp == answer){ ++counter; } } cout << counter; }