import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines n = int(read()) i = 0 n_max = n while True: if n == 1: break if n & 1: n = 3 * n + 1 else: n //= 2 i += 1 if n_max < n: n_max = n print(i, n_max, sep='\n')