n = int(input()) collatz = [n] while collatz[-1] != 1: last = collatz[-1] if last % 2: ap = 3 * last + 1 else: ap = last // 2 collatz.append(ap) ans = len(collatz) - 1, max(collatz) print(*ans, sep="\n")