n = int(input()) _max = n i = 0 while n > 1: if n % 2 == 0: n = n // 2 i += 1 else: n = 3 * n + 1 i += 1 if n > _max: _max = n print(i) print(_max)