n = int(input().strip()) c = 0 m = n while True: c += 1 n = n / 2 if n % 2 == 0 else 3 * n + 1 m = max(m, n) if n == 1: break print('{}\n{}'.format(c, int(m)))