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