#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]; } // your code goes here sort(types.begin(),types.end()); int count[5]={0,0,0,0,0}; for (int i=1; i<=5; i++) { count[i-1] = upper_bound(types.begin(),types.end(),i) - lower_bound(types.begin(),types.end(),i); } int max=0; int ans=0; for (int i=0; i<5; i++) { if (count[i] > max) { max = count[i]; ans = i+1; } } cout << ans << endl; return 0; }