number1=int(input()) n=0 while (number1!=1): if number1%2==0: number1=number1/2 else: number1=number1*3+1 n=n+1 print(n)