






'''simple docstring'''





def _UpperCAmelCase   (	a						:	int = 100_0000 ):
							snake_case__	  =       1
							snake_case__	  =       1
							snake_case__	  =       {1: 1}

							for inputa in range(2  ,					a ):
														snake_case__	  =       0
														snake_case__	  =       inputa

														while True:
																					if number in counters:
																												counter += counters[number]
																												break
																					if number % 2 == 0:
																												number //= 2
																												counter += 1
																					else:
																												snake_case__	  =       (3 * number) + 1
																												counter += 1

														if inputa not in counters:
																					snake_case__	  =       counter

														if counter > pre_counter:
																					snake_case__	  =       inputa
																					snake_case__	  =       counter
							return largest_number


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








from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


a__       =     {
    """configuration_lilt""": ["""LILT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """LiltConfig"""],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	a__       =     [
	    """LILT_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """LiltForQuestionAnswering""",
	    """LiltForSequenceClassification""",
	    """LiltForTokenClassification""",
	    """LiltModel""",
	    """LiltPreTrainedModel""",
	]

if TYPE_CHECKING:
	from .configuration_lilt import LILT_PRETRAINED_CONFIG_ARCHIVE_MAP, LiltConfig

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_lilt import (
		    LILT_PRETRAINED_MODEL_ARCHIVE_LIST,
		    LiltForQuestionAnswering,
		    LiltForSequenceClassification,
		    LiltForTokenClassification,
		    LiltModel,
		    LiltPreTrainedModel,
		)

else:
	import sys

	a__       =     _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)
