#include #include #include #include #include #include #include int main() { int n; scanf("%d",&n); int *type = malloc(sizeof(int) * n); for(int i = 0; i < n; i++) scanf("%d",&type[i]); int b[6] = {0}; for(int i = 0; i < n; i++) b[type[i]]++; int min, max = b[0]; for (int i = 1; i < 6; i++) { if(b[i] > max) max = b[i]; } for (int i = 0; i < 6; i++) { if(b[i] == max) { printf("%d\n",i); break; } } // your code goes here return 0; }