u = int(input("Entrez un nombre : "))
for n in range(30):
    if u%2 == 0:
        u = u/2
    else:
        u = 3*u+1
    print(u,"\n")
