#include <bits/stdc++.h> using namespace std; int main(){ int n; cin >> n; vector<int> types(n); for(int types_i = 0; types_i < n; types_i++){ cin >> types[types_i]; } int typy[5]; typy[0]=typy[1]=typy[2]=typy[3]=typy[4]=0; for (int i=0;i<n;i++) { typy[types[i]-1]++; } int max=typy[0]; for (int i=0;i<5;i++) { if (typy[i]>max) {max=typy[i];} } for (int i=0;i<5;i++) { if (typy[i]==max) {cout<<i+1; break;} } // your code goes here return 0; }