N = int(input()) def f(n): if(n == 1):return 0 if(n%2 == 0):return f(n//2) + 1 return f(3*n+1) + 1 print(f(N//2 if N%2 == 0 else 3*N+1) + 1)