#include #include #include #include #include using namespace std; struct types { int number; int count; }; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ types T1 = {1, 0}; types T2 = {2, 0}; types T3 = {3, 0}; types T4 = {4, 0}; types T5 = {5, 0}; int n; int integer; cin >> n; int array[n]; for(int i = 0; i < n; i++) { cin >> integer; array[i] = integer; } for(int i = 0; i < n; i++) {if(array[i] == 1) T1.count++; else if(array[i] == 2) T2.count++; else if(array[i] == 3) T3.count++; else if(array[i] == 4) T4.count++; else if(array[i] == 5) T5.count++;} struct types full[5] = {T1, T2, T3, T4, T5}; types largest= T1; for(int i = 1; i < 5; i++) { if((largest.count < full[i].count)) largest = full[i]; if((largest.number > full[i].number) && (largest.number > full[i].number)) largest = full[i]; } cout << largest.number; return 0; }