n = int(input()) cnt = 0 n_max = n while n != 1: if n % 2 == 0: n //= 2 else: n = n * 3 + 1 n_max = max(n_max, n) cnt += 1 print(cnt) print(n_max)