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