#include #include #include #include using namespace::std; using std::cin; using std::cout; using std::endl; int main() { int n; cin>>n; int c=0; int x; int count1=0,count2=0,count3=0,count4=0,count5=0; int great1,great2,gfinal; while(c>x; if(x==1) count1++; else if(x==2) count2++; else if(x==3) count3++; else if(x==4)count4++; else count5++; c++; } great1=count1>count2?count1:(count1==count2?count1:count2); great2=count3>count4?count3:(count3==count4?count3:count4); gfinal=great1>great2?great1:(great1==great2?great1:great2); gfinal=gfinal>count5?gfinal:(gfinal==count5?gfinal:count5); if(gfinal==count1)cout<<1; else if(gfinal==count2) cout<<2; else if (gfinal ==count3)cout<<3; else if (gfinal == count4)cout<<4; else cout<<5; }