l=[int(i) for i in input().split()]
res=[]
for i in l:
    count=1
    while(i>1):
        if(i%2==0):
            i=i//2
            count+=1
        elif(i%2!=0):
            i=(i*3)+1
            count+=1
        elif(i==1):
            count+=1
            break
    res.append(count)
s=','.join([str(i) for i in res])
print(s)

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: