#include using namespace std; #define rep(i, n) for(int i=0; i<(int)(n); i++) #define rep1(i, n) for(int i=1; i<(int)(n); i++) typedef long long ll; typedef vector vi; typedef vector wi; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; vi d(7); rep(i, n){ int l; cin >> l; d[l]++; } int max=0, ans; rep1(i, 7){ if(max<=d[i]){ ans=i; max=d[i]; } } cout << ans << endl; return 0; }