# 標準入力 n0 = int(input()) list = [n0] n = n0 cnt = 0 while True: # 1になればループ終了 if (n == 1): break # 偶奇で分岐 if (n % 2 == 0): n = int(n / 2) else: n = 3 * n + 1 list.append(n) cnt += 1 print(cnt) print(max(list))