n = int(input()) ans = 0 c = 0 while True: ans = max(ans,n) c += 1 if n%2 == 0: n //= 2 else: n = 3*n + 1 if n == 1: break print(c) print(ans)