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