

from __future__ import annotations

_lowerCamelCase :       Any     					=    {1: 1}






def  a_	( __lowercase     :			int				)				->						int:
			if n in COLLATZ_SEQUENCE_LENGTHS:
						return COLLATZ_SEQUENCE_LENGTHS[n]
			_snake_case						=    n // 2 if n % 2 == 0 else 3 * n + 1
			_snake_case						=    collatz_sequence_length(__lowercase				) + 1
			_snake_case						=    sequence_length
			return sequence_length






def  a_	( __lowercase     :			int = 1_000_000				)				->						int:
			_snake_case						=    max((collatz_sequence_length(__lowercase				), i) for i in range(1 ,      __lowercase				)				)
			return result[1]


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

def  a_	( __lowercase     :			int				)				->						bool:
			_snake_case						=    9

			while num > 0:
						if num % 10 != digit:
									return False
						num //= 100
						digit -= 1

			return True






def  a_	( )				->						int:
			_snake_case						=    138_902_663

			while not is_square_form(num * num				):
						if num % 10 == 3:
									num -= 6  # (3 - 6) % 10 = 7
						else:
									num -= 4  # (7 - 4) % 10 = 3

			return num * 10


if __name__ == "__main__":
			print(F'{solution() = }')