






def        UpperCAmelCase__		(						lowerCamelCase_       :       int = 1_0_0_0_0_0_0				):
			__a						:  Optional[Any]									=     1
			__a						:  Tuple									=     1
			__a						:  Dict									=     {1: 1}

			for inputa in range(2   ,  lowerCamelCase_				):
						__a						:  str									=     0
						__a						:  Optional[int]									=     inputa

						while True:
									if number in counters:
												counter += counters[number]
												break
									if number % 2 == 0:
												number //= 2
												counter += 1
									else:
												__a						:  Union[str, Any]									=     (3 * number) + 1
												counter += 1

						if inputa not in counters:
									__a						:  Union[str, Any]									=     counter

						if counter > pre_counter:
									__a						:  Dict									=     inputa
									__a						:  Optional[int]									=     counter
			return largest_number


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












'''simple docstring'''




from abc import ABC, abstractmethod
from argparse import ArgumentParser






class 				__snake_case     (					__magic_name__							):





	@staticmethod
	@abstractmethod
	def   _snake_case   (		UpperCamelCase_		)      ->		Dict:
		raise NotImplementedError()





	@abstractmethod
	def   _snake_case   (		self		)      ->		List[Any]:
		raise NotImplementedError()



