#include #include #include #include #include using namespace std; string flag(int in){ if(in==15) return "2(2+2(0))+2(2)+2+2(0)"; else if(in==14) return "2(2+2(0))+2(2)+2"; else if(in==13) return "2(2+2(0))+2(2)+2(0)"; else if(in==12) return "2(2+2(0))+2(2)"; else if(in==11) return "2(2+2(0))+2+2(0)"; else if(in==10) return "2(2+2(0))+2"; else if(in==9) return "2(2+2(0))+2(0)"; else if(in==8) return "2(2+2(0))"; else if(in==7) return "2(2)+2+2(0)"; else if(in==6) return "2(2)+2"; else if(in==5) return "2(2)+2(0)"; else if(in==4) return "2(2)"; else if(in==3) return "2+2(0)"; else if(in==2) return "2"; else return ""; } int main(){ int n; cin>>n; int a[16]={0},b[16]={-1},c[16]={-1},d[16]={-1}; for(int j=0;j<16;j++){ a[j]=pow(2,j); } int tmp=n; int i=15,js=0; while(tmp!=0){ if(tmp>=a[i]){ tmp-=a[i]; b[js]=i; js++; } i--; } for(int j=0;j