import sys input = sys.stdin.readline N=int(input()) ANS=0 while N!=1 or ANS==0: if N%2==0: N//=2 else: N=3*N+1 ANS+=1 print(ANS)