#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n = 0; cin >> n; vector heights; int i=0; while(!cin.eof()) { int h = 0; cin >> h; if (i++ < n) heights.push_back(h); } auto it = max_element(heights.begin(), heights.end()); if (it == heights.end()) cout << 0 << endl; else { int max_value = *it; int count = 0; for (auto h : heights) { if (h == max_value) ++count; } cout << count << endl; } return 0; }