#include using namespace std; int main(){ int n; cin >> n; map birds; birds[1] = 0; birds[2] = 0; birds[3] = 0; birds[4] = 0; birds[5] = 0; for(int types_i = 0; types_i < n; types_i++){ int type; cin >> type; birds[type] += 1; } long int largest_type = 0; long int count = 0; for(int i = 1; i < 6; ++i){ if(birds[i] > count){ largest_type = i; count = birds[i]; } } cout << largest_type << endl; return 0; }