#include "bits/stdc++.h" using namespace std; int main (){ int N; cin >> N; int L[7] = {0}; int max = 0, ans = 0; for (int i = 0; i < N; i++){ int tmp; cin >> tmp; L[tmp]++; } for (int i = 1; i < 7; i++) { if (L[i] >= max) { max = L[i]; ans = i; } } cout << ans << endl; return 0; }