#include #include using namespace std; int main() { int n, maxHeight = 0; cin >> n; unordered_set whichCandles; for (int i = 0, x; i < n; i++) { cin >> x; if (x > maxHeight) { maxHeight = x; whichCandles.clear(), whichCandles.insert(i); } else if (x == maxHeight) whichCandles.insert(i); } cout << whichCandles.size() << endl; }