






'''simple docstring'''
from __future__ import annotations

from typing import Dict

from ...configuration_utils import PretrainedConfig


a_ 		=       {
    'susnato/ernie-m-base_pytorch': 'https://huggingface.co/susnato/ernie-m-base_pytorch/blob/main/config.json',
    'susnato/ernie-m-large_pytorch': 'https://huggingface.co/susnato/ernie-m-large_pytorch/blob/main/config.json',
}






class    __SCREAMING_SNAKE_CASE					(	lowerCamelCase ):
 snake_case_     							=							"""ernie_m"""
 snake_case_     							=							{"""dropout""": """classifier_dropout""", """num_classes""": """num_labels"""}




 def __init__(					self		:							Union[str, Any]    ,					__lowercase		:							str = 25_00_02    ,					__lowercase		:							List[str] = 7_68    ,					__lowercase		:							Optional[Any] = 12    ,					__lowercase		:							Tuple = 12    ,					__lowercase		:							Tuple = 30_72    ,					__lowercase		:							Dict = "gelu"    ,					__lowercase		:							List[Any] = 0.1    ,					__lowercase		:							List[Any] = 0.1    ,					__lowercase		:							List[str] = 5_14    ,					__lowercase		:							Optional[int] = 0.02    ,					__lowercase		:							List[str] = 1    ,					__lowercase		:							Optional[Any] = 1e-05    ,					__lowercase		:							List[Any]=None    ,					__lowercase		:							Any=False    ,					__lowercase		:							Optional[Any]=0.0    ,					**__lowercase		:							int    ,					)		->  List[Any]:
       super().__init__(pad_token_id=__lowercase    ,					**__lowercase					)
       SCREAMING_SNAKE_CASE__   : Tuple													=vocab_size
       SCREAMING_SNAKE_CASE__   : Dict													=hidden_size
       SCREAMING_SNAKE_CASE__   : Any													=num_hidden_layers
       SCREAMING_SNAKE_CASE__   : Tuple													=num_attention_heads
       SCREAMING_SNAKE_CASE__   : Any													=intermediate_size
       SCREAMING_SNAKE_CASE__   : Any													=hidden_act
       SCREAMING_SNAKE_CASE__   : str													=hidden_dropout_prob
       SCREAMING_SNAKE_CASE__   : Union[str, Any]													=attention_probs_dropout_prob
       SCREAMING_SNAKE_CASE__   : Union[str, Any]													=max_position_embeddings
       SCREAMING_SNAKE_CASE__   : Tuple													=initializer_range
       SCREAMING_SNAKE_CASE__   : Union[str, Any]													=layer_norm_eps
       SCREAMING_SNAKE_CASE__   : str													=classifier_dropout
       SCREAMING_SNAKE_CASE__   : List[str]													=is_decoder
       SCREAMING_SNAKE_CASE__   : List[Any]													=act_dropout


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())))


