




'''simple docstring'''







from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_torch_available,
    is_vision_available,
)


_lowerCamelCase							:						Union[str, Any]								=  {
    'configuration_mobilevitv2': [
        'MOBILEVITV2_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'MobileViTV2Config',
        'MobileViTV2OnnxConfig',
    ],
}


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_lowerCamelCase							:						Optional[Any]								=  [
						    'MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST',
						    'MobileViTV2ForImageClassification',
						    'MobileViTV2ForSemanticSegmentation',
						    'MobileViTV2Model',
						    'MobileViTV2PreTrainedModel',
						]

if TYPE_CHECKING:
						from .configuration_mobilevitva import (
						    MOBILEVITV2_PRETRAINED_CONFIG_ARCHIVE_MAP,
						    MobileViTVaConfig,
						    MobileViTVaOnnxConfig,
						)

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_mobilevitva import (
												    MOBILEVITV2_PRETRAINED_MODEL_ARCHIVE_LIST,
												    MobileViTVaForImageClassification,
												    MobileViTVaForSemanticSegmentation,
												    MobileViTVaModel,
												    MobileViTVaPreTrainedModel,
												)

else:
						import sys

						_lowerCamelCase							:						Dict								=  _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)











'''simple docstring'''







from __future__ import annotations

_lowerCamelCase							:						Union[str, Any]								=  {1: 1}






def 		_lowercase		(	lowercase_  ):



		'''simple docstring'''







		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 		_lowercase		(	lowercase_ = 1000000  ):



		'''simple docstring'''







		_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())))





