N = int(input()) i1 = -1 nmax = N i = 0 while i1 == -1: if N % 2: N = 3 * N + 1 else: N = N // 2 if N == 1: i1 = i nmax = max(nmax, N) i += 1 print(i1 + 1) print(nmax)