dp = [0] * 150 dp[0] = int(input()) for i in range(150): if dp[i] == 1: break elif dp[i] % 2 == 0: dp[i+1] = dp[i] // 2 else: dp[i+1] = 3 * dp[i] + 1 print(dp.index(1)) print(max(dp))