#include using namespace std; int main() { int n; // var to hold age int max = 0; // var to hold max int int counter = 0; // var to count num of times max int occurs do { cin >> n; } while (n < 1 || n > 100000); int heights[n]; for (int i = 0; i < n; i++) { do { cin >> heights[i]; if (max <= heights[i] && heights[i] >= 1 && heights[i] <= 10000000) { max = heights[i]; } } while (heights[i] < 1 || heights[i] > 10000000); } for (int i = 0; i < n; i++) { if (heights[i] == max) { counter += 1; } } cout << counter << endl; return 0; }