#include #include #include using namespace std; int main(){ int n; cin >> n; int *flock = new int[n]; for (int i = 0; i < n; i++){ cin >> flock[i]; } int scores[5] = { 0, 0, 0, 0, 0 }; for (int i = 0; i < 5; ++i){ for (int j = 0; j < n; ++j) { if (flock[j] == (i + 1)){ scores[i] = scores[i] + 1; } } } int mostCommon = scores[0]; int birdType = 1; for (int i = 1; i < 5; i++) { if (scores[i] > mostCommon) { mostCommon = scores[i]; birdType = i + 1; } } cout << birdType; return 0; }