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