N=int(input()) c=0 def f(): global N,c N=3*N+1 if N%2==1 else N//2 c+=1 f() while N!=1:f() print(c)