N = int(input()) A = [N] while A[-1] > 1: if A[-1] % 2 == 0: A += [A[-1]//2] else: A += [A[-1] * 3 + 1] print(len(A) - 1) print(max(A))