


def 				lowerCamelCase__				(	A       :      int = 1_00_00_00					):




						'''simple docstring'''






						UpperCAmelCase					    =     1
						UpperCAmelCase					    =     1
						UpperCAmelCase					    =     {1: 1}

						for inputa in range(2				,       A					):
												UpperCAmelCase					    =     0
												UpperCAmelCase					    =     inputa

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

												if inputa not in counters:
																		UpperCAmelCase					    =     counter

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


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









'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_lowercase      :      List[str]            =					{
    """configuration_time_series_transformer""": [
        """TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """TimeSeriesTransformerConfig""",
    ],
}

try:
	if not is_torch_available():
		raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
	pass
else:
	_lowercase      :      Dict            =					[
	    """TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
	    """TimeSeriesTransformerForPrediction""",
	    """TimeSeriesTransformerModel""",
	    """TimeSeriesTransformerPreTrainedModel""",
	]


if TYPE_CHECKING:
	from .configuration_time_series_transformer import (
	    TIME_SERIES_TRANSFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
	    TimeSeriesTransformerConfig,
	)

	try:
		if not is_torch_available():
			raise OptionalDependencyNotAvailable()
	except OptionalDependencyNotAvailable:
		pass
	else:
		from .modeling_time_series_transformer import (
		    TIME_SERIES_TRANSFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
		    TimeSeriesTransformerForPrediction,
		    TimeSeriesTransformerModel,
		    TimeSeriesTransformerPreTrainedModel,
		)

else:
	import sys

	_lowercase      :      Tuple            =					_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





