#include #include #include using namespace std; int main(){ int n; cin >> n; vector types(n); for(int types_i = 0; types_i < n; types_i++){ cin >> types[types_i]; } int max = 0; int count = 0; sort(types.begin(), types.end()); int bird = types[0]; for (int i = 0; i < n; i++) { count ++; if ((types[i] != types[i+1] && i != n-1) || i == n-1){ if (count > max){ max = count; bird = types[i]; } count = 0; } } cout << bird; return 0; }