

'''simple docstring'''


import copy
import os
from typing import Union

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


lowerCAmelCase__						:       int										=						logging.get_logger(__name__)

lowerCAmelCase__						:       Tuple										=						{
    """BridgeTower/bridgetower-base""": """https://huggingface.co/BridgeTower/bridgetower-base/blob/main/config.json""",
    """BridgeTower/bridgetower-base-itm-mlm""": (
        """https://huggingface.co/BridgeTower/bridgetower-base-itm-mlm/blob/main/config.json"""
    ),
}




class     a			(				SCREAMING_SNAKE_CASE       ):






						"""simple docstring"""




						__UpperCAmelCase			     =    """bridgetower_vision_model"""







						def __init__(							self					:      int			,			snake_case_					:      Optional[int]=7_6_8			,			snake_case_					:      List[str]=1_2			,			snake_case_					:      int=3			,			snake_case_					:      str=1_6			,			snake_case_					:      Dict=2_8_8			,			snake_case_					:      str=1			,			snake_case_					:      int=1e-05			,			snake_case_					:      str=False			,			snake_case_					:      Union[str, Any]=True			,			snake_case_					:      Tuple=False			,			**snake_case_					:      str			,			):



								'''simple docstring'''



								super().__init__(**snake_case_  )
								snake_case__						:       Any       						=  hidden_size
								snake_case__						:       Any       						=  num_hidden_layers
								snake_case__						:       str       						=  num_channels
								snake_case__						:       Union[str, Any]       						=  patch_size
								snake_case__						:       int       						=  image_size
								snake_case__						:       Any       						=  initializer_factor
								snake_case__						:       int       						=  layer_norm_eps
								snake_case__						:       int       						=  stop_gradient
								snake_case__						:       Union[str, Any]       						=  share_layernorm
								snake_case__						:       Dict       						=  remove_last_layer







						@classmethod
						def       __magic_name__							(							cls					:      Any			,			snake_case_					:      Union[str, os.PathLike]			,			**snake_case_					:      Tuple  ):



								'''simple docstring'''



								snake_case__						:       List[Any]       						=  cls.get_config_dict(snake_case_			,			**snake_case_  )

								if config_dict.get('''model_type'''  ) == "bridgetower":
										snake_case__						:       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(snake_case_			,			**snake_case_  )





class     a			(				SCREAMING_SNAKE_CASE       ):






						"""simple docstring"""




						__UpperCAmelCase			     =    """bridgetower_text_model"""







						def __init__(							self					:      Optional[Any]			,			snake_case_					:      Union[str, Any]=5_0_2_6_5			,			snake_case_					:      Union[str, Any]=7_6_8			,			snake_case_					:      Optional[int]=1_2			,			snake_case_					:      Dict=1_2			,			snake_case_					:      str=1			,			snake_case_					:      Union[str, Any]=3_0_7_2			,			snake_case_					:      Optional[Any]="gelu"			,			snake_case_					:      str=0.1			,			snake_case_					:      Tuple=0.1			,			snake_case_					:      Any=5_1_4			,			snake_case_					:      Tuple=1			,			snake_case_					:      Union[str, Any]=1e-05			,			snake_case_					:      str=1			,			snake_case_					:      List[Any]=0			,			snake_case_					:      List[Any]=2			,			snake_case_					:      Any="absolute"			,			snake_case_					:      List[Any]=True			,			**snake_case_					:      Optional[Any]			,			):



								'''simple docstring'''



								super().__init__(**snake_case_  )

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







						@classmethod
						def       __magic_name__							(							cls					:      List[str]			,			snake_case_					:      Union[str, os.PathLike]			,			**snake_case_					:      Optional[int]  ):



								'''simple docstring'''



								snake_case__						:       Tuple       						=  cls.get_config_dict(snake_case_			,			**snake_case_  )

								if config_dict.get('''model_type'''  ) == "bridgetower":
										snake_case__						:       str       						=  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(snake_case_			,			**snake_case_  )





class     a			(				SCREAMING_SNAKE_CASE       ):






						"""simple docstring"""




						__UpperCAmelCase			     =    """bridgetower"""







						def __init__(							self					:      Optional[Any]			,			snake_case_					:      str=True			,			snake_case_					:      List[str]="gelu"			,			snake_case_					:      Optional[int]=7_6_8			,			snake_case_					:      Dict=1			,			snake_case_					:      str=1e-05			,			snake_case_					:      List[str]=False			,			snake_case_					:      List[str]="add"			,			snake_case_					:      Optional[Any]=1_2			,			snake_case_					:      Dict=6			,			snake_case_					:      Dict=False			,			snake_case_					:      int=False			,			snake_case_					:      List[str]=None			,			snake_case_					:      Union[str, Any]=None			,			**snake_case_					:      int			,			):



								'''simple docstring'''



								snake_case__						:       List[Any]       						=  kwargs.pop('''text_config_dict'''			,			snake_case_  )
								snake_case__						:       str       						=  kwargs.pop('''vision_config_dict'''			,			snake_case_  )

								super().__init__(**snake_case_  )
								snake_case__						:       Optional[int]       						=  share_cross_modal_transformer_layers
								snake_case__						:       str       						=  hidden_act
								snake_case__						:       Optional[int]       						=  hidden_size
								snake_case__						:       Dict       						=  initializer_factor
								snake_case__						:       int       						=  layer_norm_eps
								snake_case__						:       List[str]       						=  share_link_tower_layers
								snake_case__						:       Any       						=  link_tower_type
								snake_case__						:       str       						=  num_attention_heads
								snake_case__						:       List[Any]       						=  num_hidden_layers
								snake_case__						:       Union[str, Any]       						=  tie_word_embeddings
								snake_case__						:       int       						=  init_layernorm_from_vision_encoder

								if text_config is None:
										snake_case__						:       Union[str, Any]       						=  {}
										logger.info('''`text_config` is `None`. Initializing the `BridgeTowerTextConfig` with default values.'''  )

								if vision_config is None:
										snake_case__						:       List[str]       						=  {}
										logger.info('''`vision_config` is `None`. Initializing the `BridgeTowerVisionConfig` with default values.'''  )

								snake_case__						:       Union[str, Any]       						=  BridgeTowerTextConfig(**snake_case_  )
								snake_case__						:       str       						=  BridgeTowerVisionConfig(**snake_case_  )







						@classmethod
						def       __magic_name__							(							cls					:      List[str]			,			snake_case_					:      BridgeTowerTextConfig			,			snake_case_					:      BridgeTowerVisionConfig			,			**snake_case_					:      Tuple  ):



								'''simple docstring'''



								return cls(text_config=text_config.to_dict()			,			vision_config=vision_config.to_dict()			,			**snake_case_  )







						def       __magic_name__							(							self					:      str  ):



								'''simple docstring'''



								snake_case__						:       Dict       						=  copy.deepcopy(self.__dict__  )
								snake_case__						:       Optional[int]       						=  self.text_config.to_dict()
								snake_case__						:       Any       						=  self.vision_config.to_dict()
								snake_case__						:       List[Any]       						=  self.__class__.model_type
								return output






'''simple docstring'''


from collections.abc import Generator




def 	_a       (				):

		"""simple docstring"""

		snake_case__						,       snake_case__						:       List[Any]       						=  0, 1
		while True:
				snake_case__						,       snake_case__						:       str       						=  b, a + b
				yield b




def 	_a       (				__lowerCAmelCase		:      int = 10_00     ):

		"""simple docstring"""

		snake_case__						:       Optional[int]       						=  1
		snake_case__						:       Tuple       						=  fibonacci_generator()
		while len(str(next(__lowerCAmelCase     )     )     ) < n:
				answer += 1
		return answer + 1


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



