

def 				snake_case_(_UpperCamelCase = 1_000_000					)							->     int:



		"""simple docstring"""






		_snake_case						=							1
		_snake_case						=							1
		_snake_case						=							{1: 1}

		for inputa in range(2			,	_UpperCamelCase					):
				_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_falcon''': ['''FALCON_PRETRAINED_CONFIG_ARCHIVE_MAP''', '''FalconConfig'''],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 __A      		=     [
     '''FALCON_PRETRAINED_MODEL_ARCHIVE_LIST''',
     '''FalconForCausalLM''',
     '''FalconModel''',
     '''FalconPreTrainedModel''',
     '''FalconForSequenceClassification''',
     '''FalconForTokenClassification''',
     '''FalconForQuestionAnswering''',
 ]


if TYPE_CHECKING:
 from .configuration_falcon import FALCON_PRETRAINED_CONFIG_ARCHIVE_MAP, FalconConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_falcon import (
      FALCON_PRETRAINED_MODEL_ARCHIVE_LIST,
      FalconForCausalLM,
      FalconForQuestionAnswering,
      FalconForSequenceClassification,
      FalconForTokenClassification,
      FalconModel,
      FalconPreTrainedModel,
  )


else:
 import sys

 __A      		=     _LazyModule(__name__, globals()['''__file__'''], _import_structure, module_spec=__spec__)

