





'''simple docstring'''


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


lowerCAmelCase					:     Tuple												=logging.get_logger(__name__)

lowerCAmelCase					:     str												={
    '''google/switch-base-8''': '''https://huggingface.co/google/switch-base-8/blob/main/config.json''',
}
class       a_   (				_lowerCAmelCase							):
     __A      =			"switch_transformers"
     __A      =			["past_key_values"]
     __A      =			{"hidden_size": "d_model", "num_attention_heads": "num_heads", "num_hidden_layers": "num_layers"}





     def __init__( self		:					Optional[int]	,      lowercase		:					Optional[int]=32_128	,      lowercase		:					List[str]=768	,      lowercase		:					Dict=64	,      lowercase		:					Union[str, Any]=2_048	,      lowercase		:					Tuple=64	,      lowercase		:					List[Any]=12	,      lowercase		:					Optional[int]=3	,      lowercase		:					Union[str, Any]=12	,      lowercase		:					Tuple=3	,      lowercase		:					int=12	,      lowercase		:					Tuple=8	,      lowercase		:					List[str]=False	,      lowercase		:					Any=0.01	,      lowercase		:					Any="float32"	,      lowercase		:					Optional[int]=False	,      lowercase		:					Optional[Any]=32	,      lowercase		:					Optional[int]=128	,      lowercase		:					Dict=0.1	,      lowercase		:					List[Any]=1e-6	,      lowercase		:					str=0.0_01	,      lowercase		:					Optional[Any]=0.0_01	,      lowercase		:					int=1.0	,      lowercase		:					Optional[Any]="relu"	,      lowercase		:					Dict=True	,      lowercase		:					Optional[int]=False	,      lowercase		:					List[str]=True	,      lowercase		:					Any=0	,      lowercase		:					int=1	,      **lowercase		:					Optional[int]	,      ):





        """simple docstring"""




        lowercase_			:Optional[Any]    			= vocab_size
        lowercase_			:List[Any]    			= d_model
        lowercase_			:Tuple    			= d_kv
        lowercase_			:Any    			= d_ff

        lowercase_			:List[Any]    			= num_sparse_encoder_layers

        lowercase_			:int    			= num_layers
        lowercase_			:Tuple    			= (
            num_decoder_layers if num_decoder_layers is not None else self.num_layers
        )  # default = symmetry
        lowercase_			:Union[str, Any]    			= num_sparse_decoder_layers

        # This tells us, each how many encoder layer we'll have to set a sparse layer.
        if self.num_sparse_encoder_layers > 0:
           lowercase_			:Union[str, Any]    			= self.num_layers // self.num_sparse_encoder_layers
        else:
           lowercase_			:int    			= self.num_layers  # HACK: this will create 0 sparse layers

        # This tells us, each how many encoder layer we'll have to set a sparse layer.
        if self.num_sparse_decoder_layers > 0:
           lowercase_			:str    			= self.num_decoder_layers // self.num_sparse_decoder_layers
        else:
           lowercase_			:str    			= self.num_decoder_layers  # HACK: this will create 0 sparse layers

        lowercase_			:Optional[Any]    			= num_heads
        lowercase_			:Union[str, Any]    			= num_experts
        lowercase_			:int    			= expert_capacity
        lowercase_			:Tuple    			= router_bias
        lowercase_			:Any    			= router_jitter_noise
        if router_dtype not in ["float32", "float16", "bfloat16"]:
           raise ValueError(F'`router_dtype` must be one of \'float32\', \'float16\' or \'bfloat16\', got {router_dtype}'						)
        lowercase_			:str    			= router_dtype

        lowercase_			:Union[str, Any]    			= router_ignore_padding_tokens
        lowercase_			:Any    			= relative_attention_num_buckets
        lowercase_			:List[Any]    			= relative_attention_max_distance

        lowercase_			:Optional[Any]    			= dropout_rate
        lowercase_			:int    			= layer_norm_epsilon
        lowercase_			:Union[str, Any]    			= initializer_factor
        lowercase_			:int    			= feed_forward_proj
        lowercase_			:str    			= use_cache
        lowercase_			:Optional[int]    			= add_router_probs

        lowercase_			:Optional[int]    			= router_z_loss_coef
        lowercase_			:Optional[Any]    			= router_aux_loss_coef

        lowercase_			:Tuple    			= self.feed_forward_proj.split("-"						)
        lowercase_			:List[str]    			= act_info[-1]
        lowercase_			:Union[str, Any]    			= act_info[0] == "gated"

        if len(lowercase						) > 1 and act_info[0] != "gated" or len(lowercase						) > 2:
           raise ValueError(
               F'`feed_forward_proj`: {feed_forward_proj} is not a valid activation function of the dense layer.'
               "Please make sure `feed_forward_proj` is of the format `gated-{ACT_FN}` or `{ACT_FN}`, e.g. "
               "'gated-gelu' or 'relu'"						)

        # for backwards compatibility
        if feed_forward_proj == "gated-gelu":
           lowercase_			:Optional[Any]    			= "gelu_new"

        super().__init__(
            pad_token_id=lowercase	,      eos_token_id=lowercase	,      is_encoder_decoder=lowercase	,      **lowercase	,      )









'''simple docstring'''


def 							UpperCAmelCase_  (						__lowerCamelCase					:					int = 10_00 ):
   lowercase_			,							lowercase_			:str    			= 1, 1
   lowercase_			:Any    			= 2
   while True:
      lowercase_			:str    			= 0
      lowercase_			:Tuple    			= fa + fa
      lowercase_			,							lowercase_			:Tuple    			= fa, f
      index += 1
      for _ in str(__lowerCamelCase ):
         i += 1
      if i == n:
         break
   return index


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


