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