




"""simple docstring"""







from __future__ import annotations

SCREAMING_SNAKE_CASE_      =					{1: 1}





def     __snake_case   (							_lowercase						):


    """simple docstring"""







    if n in COLLATZ_SEQUENCE_LENGTHS:
        return COLLATZ_SEQUENCE_LENGTHS[n]
    UpperCamelCase										=  n // 2 if n % 2 == 0 else 3 * n + 1
    UpperCamelCase										=  collatz_sequence_length(_lowercase						) + 1
    UpperCamelCase										=  sequence_length
    return sequence_length





def     __snake_case   (							_lowercase = 100_0000						):


    """simple docstring"""







    UpperCamelCase										=  max((collatz_sequence_length(_lowercase						), i) for i in range(1 ,_lowercase						)						)
    return result[1]


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







"""simple docstring"""







import torch

from transformers import PreTrainedModel

from .custom_configuration import CustomConfig, NoSuperInitConfig

class 							snake_case_ (				lowerCamelCase_ ):







   """simple docstring"""




   A_										=					CustomConfig







   def __init__(		self					,				lowerCamelCase_)							->      List[Any]:
       super().__init__(lowerCamelCase_)
       UpperCamelCase										=  torch.nn.Linear(config.hidden_size					,				config.hidden_size)







   def      UpperCAmelCase__ (		self					,				lowerCamelCase_)							->      Optional[Any]:
       return self.linear(lowerCamelCase_)







   def      UpperCAmelCase__ (		self					,				lowerCamelCase_)							->      List[str]:
       pass

class 							snake_case_ (				lowerCamelCase_ ):







   """simple docstring"""




   A_										=					NoSuperInitConfig







   def __init__(		self					,				lowerCamelCase_)							->      Optional[int]:
       super().__init__(lowerCamelCase_)
       UpperCamelCase										=  torch.nn.Linear(config.attribute					,				config.attribute)







   def      UpperCAmelCase__ (		self					,				lowerCamelCase_)							->      int:
       return self.linear(lowerCamelCase_)







   def      UpperCAmelCase__ (		self					,				lowerCamelCase_)							->      Any:
       pass