// practice prob B // 2002 ECNA ACM prgm Contest #include int main(void){ int tower[101], n, i,j,r; cin>>n; while(n>0){ for(i=0;i<101;i++) tower[i]=0; for(i=0;i>r; //get ring j=1; while(j<=r && tower[j]!=1) j++; if(j==r+1) tower[r]=1; else tower[j-1]++; } cout<>n; } }