n = int(input("请输入一个自然数:"))
while 1 :
if n == 1 :
break
while n % 2 == 0:
print(n, "/2 = ", n // 2, sep='')
n = n // 2
if n % 2 != 0 :
continue
if n == 1 :
break
while n % 2 != 0:
print(n, "*3+1 = ", n * 3 + 1, sep='')
n = n * 3 + 1
if n % 2 == 0:
continue