#includeint main(){ int dec,oct[20]; scanf("%d",&dec); int i=0; while(dec) { oct[i++]=dec%8; dec/=8; } for(i--;i>=0;i--) printf("%d",oct[i]); return 0;}