


from ...configuration_utils import PretrainedConfig
from ...utils import logging


_UpperCAmelCase			:  Union[str, Any]     =logging.get_logger(__name__)

_UpperCAmelCase			:  Dict     ={
    """tanreinama/GPTSAN-2.8B-spout_is_uniform""": (
        """https://huggingface.co/tanreinama/GPTSAN-2.8B-spout_is_uniform/resolve/main/config.json"""
    ),
}







class 				snake_case__(							UpperCAmelCase__							):







						'''simple docstring'''




						SCREAMING_SNAKE_CASE__      :  Any					=							"""gptsan-japanese"""
						SCREAMING_SNAKE_CASE__      :  str					=							[
						    """past_key_values""",
						]
						SCREAMING_SNAKE_CASE__      :  str					=							{
						    """hidden_size""": """d_model""",
						    """num_attention_heads""": """num_heads""",
						    """num_hidden_layers""": """num_layers""",
						}




						def __init__(				self   ,						__lowercase=3_6_0_0_0   ,						__lowercase=1_2_8_0   ,						__lowercase=1_0_2_4   ,						__lowercase=8_1_9_2   ,						__lowercase=4_0_9_6   ,						__lowercase=1_2_8   ,						__lowercase=1_0   ,						__lowercase=0   ,						__lowercase=1_6   ,						__lowercase=1_6   ,						__lowercase=1_2_8   ,						__lowercase=0.0   ,						__lowercase=1e-5   ,						__lowercase=False   ,						__lowercase=0.0   ,						__lowercase="float32"   ,						__lowercase=False   ,						__lowercase=False   ,						__lowercase=False   ,						__lowercase=0.0_02   ,						__lowercase=False   ,						__lowercase=True   ,						__lowercase=3_5_9_9_8   ,						__lowercase=3_5_9_9_5   ,						__lowercase=3_5_9_9_9   ,						**__lowercase   ,						)					->    Tuple:
										lowerCAmelCase_ :      str    				=				vocab_size
										lowerCAmelCase_ :      str    				=				max_position_embeddings
										lowerCAmelCase_ :      Optional[int]    				=				d_model
										lowerCAmelCase_ :      Any    				=				d_ff
										lowerCAmelCase_ :      Tuple    				=				d_ext
										lowerCAmelCase_ :      List[str]    				=				d_spout
										lowerCAmelCase_ :      Optional[Any]    				=				num_switch_layers
										lowerCAmelCase_ :      Tuple    				=				num_ext_layers
										lowerCAmelCase_ :      List[Any]    				=				num_switch_layers + num_ext_layers
										lowerCAmelCase_ :      int    				=				num_heads
										lowerCAmelCase_ :      str    				=				num_experts
										lowerCAmelCase_ :      Optional[int]    				=				expert_capacity
										lowerCAmelCase_ :      int    				=				dropout_rate
										lowerCAmelCase_ :      Any    				=				layer_norm_epsilon
										lowerCAmelCase_ :      Dict    				=				router_bias
										lowerCAmelCase_ :      Optional[int]    				=				router_jitter_noise
										lowerCAmelCase_ :      Tuple    				=				router_dtype
										lowerCAmelCase_ :      Union[str, Any]    				=				router_ignore_padding_tokens
										lowerCAmelCase_ :      Tuple    				=				output_hidden_states
										lowerCAmelCase_ :      Optional[int]    				=				output_attentions
										lowerCAmelCase_ :      int    				=				initializer_factor
										lowerCAmelCase_ :      Any    				=				output_router_logits
										lowerCAmelCase_ :      int    				=				use_cache

										super().__init__(
										    separator_token_id=__lowercase   ,						pad_token_id=__lowercase   ,						eos_token_id=__lowercase   ,						**__lowercase   ,						)



def 			lowerCAmelCase (		lowerCAmelCase_ = 1_000_000 )-> int:
				lowerCAmelCase_ :      Dict    				=				1
				lowerCAmelCase_ :      List[Any]    				=				1
				lowerCAmelCase_ :      Optional[Any]    				=				{1: 1}

				for inputa in range(2 ,   lowerCAmelCase_ ):
								lowerCAmelCase_ :      Tuple    				=				0
								lowerCAmelCase_ :      Dict    				=				inputa

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

								if inputa not in counters:
												lowerCAmelCase_ :      Tuple    				=				counter

								if counter > pre_counter:
												lowerCAmelCase_ :      Optional[int]    				=				inputa
												lowerCAmelCase_ :      Union[str, Any]    				=				counter
				return largest_number


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