n = int(input()) mx = n i = 0 while n > 1: if n&1: n = n*3+1 else: n //= 2 mx = max(mx, n) i += 1 print(i) print(mx)