

"""simple docstring"""




from __future__ import annotations

__A     :    Tuple    =		{1: 1}
def    __SCREAMING_SNAKE_CASE						(						lowercase__      ):
					"""simple docstring"""
					if n in COLLATZ_SEQUENCE_LENGTHS:
										return COLLATZ_SEQUENCE_LENGTHS[n]
					A			=					n // 2 if n % 2 == 0 else 3 * n + 1
					A			=					collatz_sequence_length(lowercase__      ) + 1
					A			=					sequence_length
					return sequence_length
def    __SCREAMING_SNAKE_CASE						(						lowercase__ = 1_000_000      ):
					"""simple docstring"""
					A			=					max((collatz_sequence_length(lowercase__      ), i) for i in range(1			,							lowercase__      )      )
					return result[1]


if __name__ == "__main__":
	print(solution(int(input().strip())))








"""simple docstring"""




import doctest

import projectq
from projectq.ops import H, Measure
def    __SCREAMING_SNAKE_CASE						(						lowercase__      ):
					"""simple docstring"""
					A			=					quantum_engine.allocate_qubit()
					H | qubit
					Measure | qubit
					return int(lowercase__      )


if __name__ == "__main__":
	doctest.testmod()

	# initialises a new quantum backend
	__A     :    Dict    =		projectq.MainEngine()

	# Generate a list of 10 random numbers
	__A     :    Any    =		[get_random_number(quantum_engine) for _ in range(10)]

	# Flushes the quantum engine from memory
	quantum_engine.flush()

	print('Random numbers', random_numbers_list)





