from __future__ import annotations

snake_case__						      =			{1: 1}
def    __magic_name__(	__UpperCAmelCase		)    ->     int:



      '''simple docstring'''

      if n in COLLATZ_SEQUENCE_LENGTHS:
            return COLLATZ_SEQUENCE_LENGTHS[n]
      _lowerCamelCase           =					n // 2 if n % 2 == 0 else 3 * n + 1
      _lowerCamelCase           =					collatz_sequence_length(SCREAMING_SNAKE_CASE__		) + 1
      _lowerCamelCase           =					sequence_length
      return sequence_length
def    __magic_name__(	__UpperCAmelCase = 100_0000		)    ->     int:



      '''simple docstring'''

      _lowerCamelCase           =					max((collatz_sequence_length(SCREAMING_SNAKE_CASE__		), i) for i in range(1			,    SCREAMING_SNAKE_CASE__		)		)
      return result[1]


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






'''simple docstring'''







from typing import TYPE_CHECKING

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


snake_case_  :							Any            =	{
    "configuration_flava": [
        "FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP",
        "FlavaConfig",
        "FlavaImageCodebookConfig",
        "FlavaImageConfig",
        "FlavaMultimodalConfig",
        "FlavaTextConfig",
    ],
}

try:
					if not is_vision_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					snake_case_  :							List[str]            =	["FlavaFeatureExtractor"]
					snake_case_  :							int            =	["FlavaImageProcessor"]
					snake_case_  :							Tuple            =	["FlavaProcessor"]

try:
					if not is_torch_available():
										raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
					pass
else:
					snake_case_  :							Optional[int]            =	[
					    "FLAVA_PRETRAINED_MODEL_ARCHIVE_LIST",
					    "FlavaForPreTraining",
					    "FlavaImageCodebook",
					    "FlavaImageModel",
					    "FlavaModel",
					    "FlavaMultimodalModel",
					    "FlavaPreTrainedModel",
					    "FlavaTextModel",
					]

if TYPE_CHECKING:
					from .configuration_flava import (
					    FLAVA_PRETRAINED_CONFIG_ARCHIVE_MAP,
					    FlavaConfig,
					    FlavaImageCodebookConfig,
					    FlavaImageConfig,
					    FlavaMultimodalConfig,
					    FlavaTextConfig,
					)

					try:
										if not is_vision_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .feature_extraction_flava import FlavaFeatureExtractor
										from .image_processing_flava import FlavaImageProcessor
										from .processing_flava import FlavaProcessor

					try:
										if not is_torch_available():
															raise OptionalDependencyNotAvailable()
					except OptionalDependencyNotAvailable:
										pass
					else:
										from .modeling_flava import (
										    FLAVA_PRETRAINED_MODEL_ARCHIVE_LIST,
										    FlavaForPreTraining,
										    FlavaImageCodebook,
										    FlavaImageModel,
										    FlavaModel,
										    FlavaMultimodalModel,
										    FlavaPreTrainedModel,
										    FlavaTextModel,
										)

else:
					import sys

					snake_case_  :							Any            =	_LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)





