n = int(input()) nmax = n i = 0 while n != 1: if n&1: n = 3*n + 1 else: n //= 2 i += 1 nmax = max(nmax, n) print(i) print(nmax)