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