n = int(input()) ans = 0 c = 1000 for k in range(1000000): ans = max(ans,n) if n == 1: c = min(c,k) if n%2 == 0: n //= 2 else: n = 3*n + 1 print(c) print(ans)