#include #include #include #include #include #include #include int main(){ int n, type1, type2, type3, type4, type5, a, b, c, d, e, max; scanf("%d",&n); int *types = malloc(sizeof(int) * n); for(int types_i = 0; types_i < n; types_i++){ scanf("%d",&types[types_i]); } for(a=0; a<=n; a++) { if (types[a] == 1) { ++type1; } } for(b=0; b<=n; b++) { if (types[b] == 2) { ++type2; } } for(c=0; c<=n; c++) { if (types[c] == 3) { ++type3; } } for(d=0; d<=n; d++) { if (types[d] == 4) { ++type4; } } for(e=0; e<=n; e++) { if (types[e] == 5) { ++type5; } } if (type1>type2) { if (type2>type3) { if (type3>type4) { if (type4>type5) { max = type1; } else { if (type1>5) { max = 1; } else max = 5; } } else { if (type1>type4) { if(type4>type5) { max = 1; } else { if (type1>type5) { max = 1; } else max = 5; } } else { if(type4>type5) { max = 4; } else max = 5; } } } else { if (type1>type3) { if (type3>type4) { if (type4>type5) { max = 1; } else { if (type1>type5) { max = 1; } else max = 5; } } else { if (type1>type4) { if (type4>type5) { max = 1; } else max = 4; } else { if (type4>type5) { max = 4; } else max = 5; } } } else { if (type3>type4) { if (type4>type5) { max = 3; } else max = 4; } else { if (type4>type5) { max = 4; } else max = 5; } } } } else { if (type2>type3) { if (type3>type4) { if (type4>type5) { max = 2; } else { if(type2>type5) { max = 2; } else max = 5; } } else { if(type2>type4) { if(type4>type5) { max = 2; } else { if (type2>type5) { max = 2; } else max = 5; } } else { if (type4>type5) { max = 2; } else { if (type2>type5) { max = 2; } else max = 5; } } } } } printf("%d", max); return 0; }