#include using namespace std; const long long INF = 1LL << 60; #define MOD 1000000007; typedef long long ll; #define writeln(n) cout< P; typedef pair Psi; int d[7]; int main() { int n=0; cin>>n; for(int i=0; i>tmp; d[tmp]++; } int ma = d[1]; int ans =1; for(int i=2; i<=6; i++){ if(ma <= d[i]){ ans =i; ma = d[i]; } } writeln(ans); }