#CODE = #B041
num = int(input("Enter a number: ")) #100
#empty list to store octal numbers
octal_num = []
while num != 0:
rem = num % 8
octal_num.append(rem)
num = num // 8
#reverse a list
octal_num = octal_num[::-1]
print("Octal of given number is ",end='')
for i in octal_num:
print(i,end="") #144