





def  SCREAMING_SNAKE_CASE   ( _UpperCAmelCase = 100_0000				)    ->  int:
    lowerCamelCase__					:   Optional[int]      				=	1
    lowerCamelCase__					:   int      				=	1
    lowerCamelCase__					:   int      				=	{1: 1}

    for inputa in range(2		,			_UpperCAmelCase				):
        lowerCamelCase__					:   Union[str, Any]      				=	0
        lowerCamelCase__					:   Any      				=	inputa

        while True:
            if number in counters:
                counter += counters[number]
                break
            if number % 2 == 0:
                number //= 2
                counter += 1
            else:
                lowerCamelCase__					:   Union[str, Any]      				=	(3 * number) + 1
                counter += 1

        if inputa not in counters:
            lowerCamelCase__					:   str      				=	counter

        if counter > pre_counter:
            lowerCamelCase__					:   str      				=	inputa
            lowerCamelCase__					:   Dict      				=	counter
    return largest_number


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












from typing import TYPE_CHECKING

# rely on isort to merge the imports
from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


_UpperCAmelCase       : List[str]			     =       {
    """configuration_autoformer""": [
        """AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP""",
        """AutoformerConfig""",
    ],
}

try:
    if not is_torch_available():
        raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
    pass
else:
    _UpperCAmelCase       : List[Any]			     =       [
        """AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST""",
        """AutoformerForPrediction""",
        """AutoformerModel""",
        """AutoformerPreTrainedModel""",
    ]


if TYPE_CHECKING:
    from .configuration_autoformer import (
        AUTOFORMER_PRETRAINED_CONFIG_ARCHIVE_MAP,
        AutoformerConfig,
    )

    try:
        if not is_torch_available():
            raise OptionalDependencyNotAvailable()
    except OptionalDependencyNotAvailable:
        pass
    else:
        from .modeling_autoformer import (
            AUTOFORMER_PRETRAINED_MODEL_ARCHIVE_LIST,
            AutoformerForPrediction,
            AutoformerModel,
            AutoformerPreTrainedModel,
        )

else:
    import sys

    _UpperCAmelCase       : Dict			     =       _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)





