
"""simple docstring"""





import copy
import os
from typing import TYPE_CHECKING, List, Union


if TYPE_CHECKING:
    pass

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


_a		       =							logging.get_logger(__name__)

_a		       =							{
    'kakaobrain/align-base': 'https://huggingface.co/kakaobrain/align-base/resolve/main/config.json',
}


class A_	(lowercase__      ):




  '''simple docstring'''
  SCREAMING_SNAKE_CASE__			:						Dict       =		"""align_text_model"""







  def __init__(		self				,   lowercase_=3_0522				,   lowercase_=768				,   lowercase_=12				,   lowercase_=12				,   lowercase_=3072				,   lowercase_="gelu"				,   lowercase_=0.1				,   lowercase_=0.1				,   lowercase_=512				,   lowercase_=2				,   lowercase_=0.02				,   lowercase_=1E-1_2				,   lowercase_=0				,   lowercase_="absolute"				,   lowercase_=True				,   **lowercase_				,   ):

     """simple docstring"""
     super().__init__(**lowercase_  )

     UpperCAmelCase_					:					int			     =    vocab_size
     UpperCAmelCase_					:					Tuple			     =    hidden_size
     UpperCAmelCase_					:					Optional[int]			     =    num_hidden_layers
     UpperCAmelCase_					:					List[str]			     =    num_attention_heads
     UpperCAmelCase_					:					str			     =    hidden_act
     UpperCAmelCase_					:					Tuple			     =    intermediate_size
     UpperCAmelCase_					:					Any			     =    hidden_dropout_prob
     UpperCAmelCase_					:					int			     =    attention_probs_dropout_prob
     UpperCAmelCase_					:					Union[str, Any]			     =    max_position_embeddings
     UpperCAmelCase_					:					str			     =    type_vocab_size
     UpperCAmelCase_					:					Dict			     =    initializer_range
     UpperCAmelCase_					:					int			     =    layer_norm_eps
     UpperCAmelCase_					:					Tuple			     =    position_embedding_type
     UpperCAmelCase_					:					Dict			     =    use_cache
     UpperCAmelCase_					:					Optional[int]			     =    pad_token_id







  @classmethod
  def        UpperCamelCase__					(		cls				,   lowercase_				,   **lowercase_  ):

     """simple docstring"""
     cls._set_token_in_kwargs(lowercase_  )

     UpperCAmelCase_     ,   UpperCAmelCase_					:					int			     =    cls.get_config_dict(lowercase_				,   **lowercase_  )

     # get the text config dict if we are loading from AlignConfig
     if config_dict.get("model_type"  ) == "align":
        UpperCAmelCase_					:					Union[str, Any]			     =    config_dict["text_config"]

     if "model_type" in config_dict and hasattr(cls				,   "model_type"  ) and config_dict["model_type"] != cls.model_type:
        logger.warning(
            F"""You are using a model of type {config_dict["model_type"]} to instantiate a model of type """
            F"""{cls.model_type}. This is not supported for all configurations of models and can yield errors."""  )

     return cls.from_dict(lowercase_				,   **lowercase_  )




class A_	(lowercase__      ):




  '''simple docstring'''
  SCREAMING_SNAKE_CASE__			:						int       =		"""align_vision_model"""







  def __init__(		self				,   lowercase_ = 3				,   lowercase_ = 600				,   lowercase_ = 2.0				,   lowercase_ = 3.1				,   lowercase_ = 8				,   lowercase_ = [3, 3, 5, 3, 5, 5, 3]				,   lowercase_ = [32, 16, 24, 40, 80, 112, 192]				,   lowercase_ = [16, 24, 40, 80, 112, 192, 320]				,   lowercase_ = []				,   lowercase_ = [1, 2, 2, 2, 1, 2, 1]				,   lowercase_ = [1, 2, 2, 3, 3, 4, 1]				,   lowercase_ = [1, 6, 6, 6, 6, 6, 6]				,   lowercase_ = 0.25				,   lowercase_ = "swish"				,   lowercase_ = 2560				,   lowercase_ = "mean"				,   lowercase_ = 0.02				,   lowercase_ = 0.0_01				,   lowercase_ = 0.99				,   lowercase_ = 0.2				,   **lowercase_				,   ):

     """simple docstring"""
     super().__init__(**lowercase_  )

     UpperCAmelCase_					:					List[str]			     =    num_channels
     UpperCAmelCase_					:					Optional[Any]			     =    image_size
     UpperCAmelCase_					:					Any			     =    width_coefficient
     UpperCAmelCase_					:					Dict			     =    depth_coefficient
     UpperCAmelCase_					:					Union[str, Any]			     =    depth_divisor
     UpperCAmelCase_					:					int			     =    kernel_sizes
     UpperCAmelCase_					:					Dict			     =    in_channels
     UpperCAmelCase_					:					Tuple			     =    out_channels
     UpperCAmelCase_					:					Optional[int]			     =    depthwise_padding
     UpperCAmelCase_					:					Dict			     =    strides
     UpperCAmelCase_					:					Tuple			     =    num_block_repeats
     UpperCAmelCase_					:					Tuple			     =    expand_ratios
     UpperCAmelCase_					:					Dict			     =    squeeze_expansion_ratio
     UpperCAmelCase_					:					Union[str, Any]			     =    hidden_act
     UpperCAmelCase_					:					Optional[Any]			     =    hidden_dim
     UpperCAmelCase_					:					List[Any]			     =    pooling_type
     UpperCAmelCase_					:					Union[str, Any]			     =    initializer_range
     UpperCAmelCase_					:					str			     =    batch_norm_eps
     UpperCAmelCase_					:					List[str]			     =    batch_norm_momentum
     UpperCAmelCase_					:					Any			     =    drop_connect_rate
     UpperCAmelCase_					:					str			     =    sum(lowercase_  ) * 4







  @classmethod
  def        UpperCamelCase__					(		cls				,   lowercase_				,   **lowercase_  ):

     """simple docstring"""
     cls._set_token_in_kwargs(lowercase_  )

     UpperCAmelCase_     ,   UpperCAmelCase_					:					List[str]			     =    cls.get_config_dict(lowercase_				,   **lowercase_  )

     # get the vision config dict if we are loading from AlignConfig
     if config_dict.get("model_type"  ) == "align":
        UpperCAmelCase_					:					Any			     =    config_dict["vision_config"]

     if "model_type" in config_dict and hasattr(cls				,   "model_type"  ) and config_dict["model_type"] != cls.model_type:
        logger.warning(
            F"""You are using a model of type {config_dict["model_type"]} to instantiate a model of type """
            F"""{cls.model_type}. This is not supported for all configurations of models and can yield errors."""  )

     return cls.from_dict(lowercase_				,   **lowercase_  )




class A_	(lowercase__      ):




  '''simple docstring'''
  SCREAMING_SNAKE_CASE__			:						int       =		"""align"""
  SCREAMING_SNAKE_CASE__			:						str       =		True







  def __init__(		self				,   lowercase_=None				,   lowercase_=None				,   lowercase_=640				,   lowercase_=1.0				,   lowercase_=0.02				,   **lowercase_				,   ):

     """simple docstring"""
     super().__init__(**lowercase_  )

     if text_config is None:
        UpperCAmelCase_					:					Union[str, Any]			     =    {}
        logger.info("text_config is None. Initializing the AlignTextConfig with default values."  )

     if vision_config is None:
        UpperCAmelCase_					:					Tuple			     =    {}
        logger.info("vision_config is None. Initializing the AlignVisionConfig with default values."  )

     UpperCAmelCase_					:					Tuple			     =    AlignTextConfig(**lowercase_  )
     UpperCAmelCase_					:					str			     =    AlignVisionConfig(**lowercase_  )

     UpperCAmelCase_					:					List[Any]			     =    projection_dim
     UpperCAmelCase_					:					Union[str, Any]			     =    temperature_init_value
     UpperCAmelCase_					:					Union[str, Any]			     =    initializer_range







  @classmethod
  def        UpperCamelCase__					(		cls				,   lowercase_				,   lowercase_				,   **lowercase_  ):

     """simple docstring"""
     return cls(text_config=text_config.to_dict()				,   vision_config=vision_config.to_dict()				,   **lowercase_  )







  def        UpperCamelCase__					(		self  ):

     """simple docstring"""
     UpperCAmelCase_					:					int			     =    copy.deepcopy(self.__dict__  )
     UpperCAmelCase_					:					Dict			     =    self.text_config.to_dict()
     UpperCAmelCase_					:					str			     =    self.vision_config.to_dict()
     UpperCAmelCase_					:					Optional[Any]			     =    self.__class__.model_type
     return output






def 				__lowerCamelCase						( UpperCAmelCase_						:		int = 1000						):




      """simple docstring"""





      a							,				a						:int 							=       1, 1
      a						:Any 							=       2
      while True:
            a						:Optional[int] 							=       0
            a						:str 							=       fa + fa
            a							,				a						:List[Any] 							=       fa, f
            index += 1
            for _ in str(UpperCAmelCase_						):
                  i += 1
            if i == n:
                  break
      return index


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





