






"""simple docstring"""






def 					_A			(__a = 1_00_00_00							) ->       int:
    """simple docstring"""






    SCREAMING_SNAKE_CASE_      :  Any    						=		1
    SCREAMING_SNAKE_CASE_      :  Optional[int]    						=		1
    SCREAMING_SNAKE_CASE_      :  str    						=		{1: 1}

    for inputa in range(2    ,				__a							):
        SCREAMING_SNAKE_CASE_      :  Optional[Any]    						=		0
        SCREAMING_SNAKE_CASE_      :  Dict    						=		inputa

        while True:
            if number in counters:
                counter += counters[number]
                break
            if number % 2 == 0:
                number //= 2
                counter += 1
            else:
                SCREAMING_SNAKE_CASE_      :  Dict    						=		(3 * number) + 1
                counter += 1

        if inputa not in counters:
            SCREAMING_SNAKE_CASE_      :  Dict    						=		counter

        if counter > pre_counter:
            SCREAMING_SNAKE_CASE_      :  Tuple    						=		inputa
            SCREAMING_SNAKE_CASE_      :  Optional[int]    						=		counter
    return largest_number


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










"""simple docstring"""






from typing import TYPE_CHECKING

from ...file_utils import _LazyModule, is_tokenizers_available, is_torch_available
from ...utils import OptionalDependencyNotAvailable


UpperCAmelCase_   : str   			= {"""configuration_gpt_neox""": ["""GPT_NEOX_PRETRAINED_CONFIG_ARCHIVE_MAP""", """GPTNeoXConfig"""]}

try:
  if not is_tokenizers_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase_   : Dict   			= ["""GPTNeoXTokenizerFast"""]

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  UpperCAmelCase_   : List[str]   			= [
      """GPT_NEOX_PRETRAINED_MODEL_ARCHIVE_LIST""",
      """GPTNeoXForCausalLM""",
      """GPTNeoXForQuestionAnswering""",
      """GPTNeoXForSequenceClassification""",
      """GPTNeoXForTokenClassification""",
      """GPTNeoXLayer""",
      """GPTNeoXModel""",
      """GPTNeoXPreTrainedModel""",
  ]


if TYPE_CHECKING:
  from .configuration_gpt_neox import GPT_NEOX_PRETRAINED_CONFIG_ARCHIVE_MAP, GPTNeoXConfig

  try:
    if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .tokenization_gpt_neox_fast import GPTNeoXTokenizerFast

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_gpt_neox import (
        GPT_NEOX_PRETRAINED_MODEL_ARCHIVE_LIST,
        GPTNeoXForCausalLM,
        GPTNeoXForQuestionAnswering,
        GPTNeoXForSequenceClassification,
        GPTNeoXForTokenClassification,
        GPTNeoXLayer,
        GPTNeoXModel,
        GPTNeoXPreTrainedModel,
    )


else:
  import sys

  UpperCAmelCase_   : Tuple   			= _LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)


