'''simple docstring'''




from __future__ import annotations

_A										= {1: 1}

def _UpperCamelCase (							SCREAMING_SNAKE_CASE_				):
     if n in COLLATZ_SEQUENCE_LENGTHS:
          return COLLATZ_SEQUENCE_LENGTHS[n]
     lowercase_       :							Optional[int]  					=       n // 2 if n % 2 == 0 else 3 * n + 1
     lowercase_       :							Any  					=       collatz_sequence_length(SCREAMING_SNAKE_CASE_				) + 1
     lowercase_       :							Tuple  					=       sequence_length
     return sequence_length

def _UpperCamelCase (							SCREAMING_SNAKE_CASE_ = 1_000_000				):
     lowercase_       :							Optional[int]  					=       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,
)


_A										= {
    'configuration_rwkv': ['RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP', 'RwkvConfig', 'RwkvOnnxConfig'],
}

try:
 if not is_torch_available():
  raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
 pass
else:
 _A										= [
     'RWKV_PRETRAINED_MODEL_ARCHIVE_LIST',
     'RwkvForCausalLM',
     'RwkvModel',
     'RwkvPreTrainedModel',
 ]


if TYPE_CHECKING:
 from .configuration_rwkv import RWKV_PRETRAINED_CONFIG_ARCHIVE_MAP, RwkvConfig, RwkvOnnxConfig

 try:
  if not is_torch_available():
   raise OptionalDependencyNotAvailable()
 except OptionalDependencyNotAvailable:
  pass
 else:
  from .modeling_rwkv import (
      RWKV_PRETRAINED_MODEL_ARCHIVE_LIST,
      RwkvForCausalLM,
      RwkvModel,
      RwkvPreTrainedModel,
  )
else:
 import sys

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




