N = int(input()) n = 0 while N > 1 or n == 0: if N & 1: N = 3 * N + 1 else: N >>= 1 n += 1 print(n)