from fractions import gcd from datetime import date from math import factorial import functools from heapq import* from collections import deque import collections import math from collections import defaultdict, Counter import sys sys.setrecursionlimit(10 ** 7) MOD = 10 ** 9 + 7 inf = float("inf") def main(): n = int(input()) ansi = 0 nmax = n while n != 1: if n % 2 == 0: n //= 2 else: n = 3 * n + 1 ansi += 1 nmax = max(nmax, n) print(ansi) print(nmax) if __name__ == '__main__': main()