n=input();i=1;exec'i+=1;r="";m=n\nwhile m:r=chr(48+(m%i>9)*39+m%i)+r;m/=i\nprint r;'*35