
from __future__ import annotations

A__       :   Dict   						=					{1: 1}



def      _a     (   __UpperCamelCase       :  Any    ):



   if n in COLLATZ_SEQUENCE_LENGTHS:
      return COLLATZ_SEQUENCE_LENGTHS[n]
   lowerCAmelCase__ :    str				      =			n // 2 if n % 2 == 0 else 3 * n + 1
   lowerCAmelCase__ :    int				      =			collatz_sequence_length(__UpperCamelCase    ) + 1
   lowerCAmelCase__ :    Tuple				      =			sequence_length
   return sequence_length



def      _a     (   __UpperCamelCase       :  Any = 100_0000    ):
   lowerCAmelCase__ :    Tuple				      =			max((collatz_sequence_length(__UpperCamelCase    ), i) for i in range(1	,__UpperCamelCase    )    )
   return result[1]


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





from typing import TYPE_CHECKING

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


A__       :   Union[str, Any]   						=					{"""configuration_cvt""": ["""CVT_PRETRAINED_CONFIG_ARCHIVE_MAP""", """CvtConfig"""]}


try:
							if not is_torch_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							A__       :   Union[str, Any]   						=					[
							    """CVT_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """CvtForImageClassification""",
							    """CvtModel""",
							    """CvtPreTrainedModel""",
							]

try:
							if not is_tf_available():
														raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
							pass
else:
							A__       :   str   						=					[
							    """TF_CVT_PRETRAINED_MODEL_ARCHIVE_LIST""",
							    """TFCvtForImageClassification""",
							    """TFCvtModel""",
							    """TFCvtPreTrainedModel""",
							]

if TYPE_CHECKING:
							from .configuration_cvt import CVT_PRETRAINED_CONFIG_ARCHIVE_MAP, CvtConfig

							try:
														if not is_torch_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_cvt import (
														    CVT_PRETRAINED_MODEL_ARCHIVE_LIST,
														    CvtForImageClassification,
														    CvtModel,
														    CvtPreTrainedModel,
														)

							try:
														if not is_tf_available():
																					raise OptionalDependencyNotAvailable()
							except OptionalDependencyNotAvailable:
														pass
							else:
														from .modeling_tf_cvt import (
														    TF_CVT_PRETRAINED_MODEL_ARCHIVE_LIST,
														    TFCvtForImageClassification,
														    TFCvtModel,
														    TFCvtPreTrainedModel,
														)


else:
							import sys

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



