




from __future__ import annotations

lowercase_		=							{1: 1}







def  lowerCAmelCase  (	UpperCAmelCase       )  ->int:






					"""simple docstring"""






					if n in COLLATZ_SEQUENCE_LENGTHS:
										return COLLATZ_SEQUENCE_LENGTHS[n]
					__magic_name__					:							Any		   =							n // 2 if n % 2 == 0 else 3 * n + 1
					__magic_name__					:							Tuple		   =							collatz_sequence_length(UpperCAmelCase       ) + 1
					__magic_name__					:							Tuple		   =							sequence_length
					return sequence_length







def  lowerCAmelCase  (	UpperCAmelCase = 100_0000       )  ->int:






					"""simple docstring"""






					__magic_name__					:							List[str]		   =							max((collatz_sequence_length(UpperCAmelCase       ), i) for i in range(1,	UpperCAmelCase       )       )
					return result[1]


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









def  lowerCAmelCase  (	UpperCAmelCase       )  ->str:






					"""simple docstring"""






					return " ".join(sorted(set(sentence.split()       )       )       )


if __name__ == "__main__":
				import doctest

				doctest.testmod()



