

from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_torch_available


lowercase_									=   {
    'configuration_nllb_moe': [
        'NLLB_MOE_PRETRAINED_CONFIG_ARCHIVE_MAP',
        'NllbMoeConfig',
    ]
}

try:
  if not is_torch_available():
    raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
  pass
else:
  lowercase_									=   [
      'NLLB_MOE_PRETRAINED_MODEL_ARCHIVE_LIST',
      'NllbMoeForConditionalGeneration',
      'NllbMoeModel',
      'NllbMoePreTrainedModel',
      'NllbMoeTop2Router',
      'NllbMoeSparseMLP',
  ]


if TYPE_CHECKING:
  from .configuration_nllb_moe import (
      NLLB_MOE_PRETRAINED_CONFIG_ARCHIVE_MAP,
      NllbMoeConfig,
  )

  try:
    if not is_torch_available():
      raise OptionalDependencyNotAvailable()
  except OptionalDependencyNotAvailable:
    pass
  else:
    from .modeling_nllb_moe import (
        NLLB_MOE_PRETRAINED_MODEL_ARCHIVE_LIST,
        NllbMoeForConditionalGeneration,
        NllbMoeModel,
        NllbMoePreTrainedModel,
        NllbMoeSparseMLP,
        NllbMoeTopaRouter,
    )


else:
  import sys

  lowercase_									=   _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)





def      a      (			A__	:   int = 1000000     )    ->      int:





      """simple docstring"""



      _lowercase	       =1
      _lowercase	       =1
      _lowercase	       ={1: 1}

      for inputa in range(2      ,   A__     ):
            _lowercase	       =0
            _lowercase	       =inputa

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

            if inputa not in counters:
                  _lowercase	       =counter

            if counter > pre_counter:
                  _lowercase	       =inputa
                  _lowercase	       =counter
      return largest_number


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


