#include using namespace std; int main(){ int n; cin >> n; vector types(6, 0); for(int types_i = 0; types_i < n; types_i++){ int x; cin >> x; types[x]++; } int max = 0, res; for(int i = 1; i < 6; i++){ if(types[i] > max){ res = i; max = types[i]; } } cout << res; // your code goes here return 0; }