class Problem0887: def collatz(this, num): res = [num] while num != 1: if num % 2 == 0: num /= 2 else: num = num * 3 + 1 res.append(int(num)) return res def solve(this): n = int(input()) t = this.collatz(n) print(len(t) - 1) print(max(t)) if __name__ == "__main__": problem = Problem0887() problem.solve()