#include using namespace std; int main() { int n, t, ans, Max = 0; int L[7] = {}; cin >> n; for (int i = 0; i < n; i++) { cin >> t; L[t]++; } for (int i = 1; i <= 6; i++) { if (Max <= L[i]) { Max = L[i]; ans = i; } } cout << ans << endl; return 0; }