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