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