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