a = int(input()) ans = [] ans.append(a) temp = a idx = 0 i = 0 while True: if temp == 1: idx = i break if temp % 2 != 0: temp = 3 * temp + 1 else: temp = temp / 2 ans.append(temp) i += 1 print(idx) print(int(max(ans)))