#include using namespace std; int main(){ long long n; cin >> n; vector types(n); for(long types_i = 0; types_i < n; types_i++){ cin >> types[types_i]; } // your code goes here vector type(6); for(int i=0; i < n; i++){ type[types[i]]++; } long max = -1; long low_index = 999; for(int i=1; i<6; i++) { if(type[i] > max){ max = type[i]; low_index = i; } else if(type[i] == max){ if(low_index > i) low_index = i; } } cout << low_index; return 0; }