i1 = 0 nmax = 1 n = int(input()) while n > 1: if n > nmax: nmax = n if n % 2 == 0: n = n // 2 else: n = 3 * n + 1 i1 = i1 + 1 print(i1) print(nmax)