n0 = int(input()) if n0 == 1: print(0) print(4) exit() if n0 == 2: print(1) print(4) exit() n = n0 nmax = n0 for i in range(401): if n%2 == 0: n //= 2 else: n = 3*n+1 nmax = max(n, nmax) if n == 1: i1 = i+1 break print(i1) print(nmax)