#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; int main() { int n; cin >> n; int memo[8]; memset(memo, 0, sizeof(memo)); for (int i = 0; i < n; i++) { int x; cin >> x; memo[x]++; } int level = 7; int maxi = 0; for (int i = 7; i >= 1; i--) { if (maxi < memo[i]) { maxi = memo[i]; level = i; } } cout << level << endl; }