# https://github.com/touma6174/competitive-programming-library.git def yn(x: bool) -> None: print("Yes" if x else "No") def YN(x: bool) -> None: print("YES" if x else "NO") dr: list[int] = [-1, 0, 0, 1]; dc: list[int] = [0, -1, 1, 0] dr8: list[int] = [-1, -1, -1, 0, 0, 1, 1, 1]; dc8: list[int] = [-1, 0, 1, -1, 1, -1, 0, 1] N = int(input()) cnt = 0 N_max = N while N > 1: if N & 1: N = 3 * N + 1 else: N //= 2 cnt += 1 N_max = max(N_max, N) print(cnt) print(N_max)