N=int(input()) ans=0 if N==1: print(3) exit() while N>1: if N%2==0: N//=2 else: N=3*N+1 ans+=1 print(ans)