


'''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


__snake_case          =  logging.get_logger(__name__)

__snake_case          =  {
    '''kakaobrain/align-base''': '''https://huggingface.co/kakaobrain/align-base/resolve/main/config.json''',
}
class      lowercase			(							A__      ):

		"""simple docstring"""

		_a									=       'align_text_model'




		def __init__(	self					,     UpperCamelCase_=30522					,     UpperCamelCase_=768					,     UpperCamelCase_=12					,     UpperCamelCase_=12					,     UpperCamelCase_=3072					,     UpperCamelCase_="gelu"					,     UpperCamelCase_=0.1					,     UpperCamelCase_=0.1					,     UpperCamelCase_=512					,     UpperCamelCase_=2					,     UpperCamelCase_=0.02					,     UpperCamelCase_=1e-12					,     UpperCamelCase_=0					,     UpperCamelCase_="absolute"					,     UpperCamelCase_=True					,     **UpperCamelCase_					,     ):

							'''simple docstring'''


							super().__init__(**UpperCamelCase_							)

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




		@classmethod
		def 					lowerCAmelCase__       (	cls					,     UpperCamelCase_					,     **UpperCamelCase_							):

							'''simple docstring'''


							cls._set_token_in_kwargs(UpperCamelCase_							)

							UpperCamelCase__     :List[str]							      =				cls.get_config_dict(UpperCamelCase_					,     **UpperCamelCase_							)

							# get the text config dict if we are loading from AlignConfig
							if config_dict.get('''model_type'''							) == "align":
												UpperCamelCase__     :Dict							      =				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(UpperCamelCase_					,     **UpperCamelCase_							)



class      lowercase			(							A__      ):

		"""simple docstring"""

		_a									=       'align_vision_model'




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

							'''simple docstring'''


							super().__init__(**UpperCamelCase_							)

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




		@classmethod
		def 					lowerCAmelCase__       (	cls					,     UpperCamelCase_					,     **UpperCamelCase_							):

							'''simple docstring'''


							cls._set_token_in_kwargs(UpperCamelCase_							)

							UpperCamelCase__     :Union[str, Any]							      =				cls.get_config_dict(UpperCamelCase_					,     **UpperCamelCase_							)

							# get the vision config dict if we are loading from AlignConfig
							if config_dict.get('''model_type'''							) == "align":
												UpperCamelCase__     :Union[str, 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(UpperCamelCase_					,     **UpperCamelCase_							)



class      lowercase			(							A__      ):

		"""simple docstring"""

		_a									=       'align'
		_a									=       True




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

							'''simple docstring'''


							super().__init__(**UpperCamelCase_							)

							if text_config is None:
												UpperCamelCase__     :Dict							      =				{}
												logger.info('''text_config is None. Initializing the AlignTextConfig with default values.'''							)

							if vision_config is None:
												UpperCamelCase__     :str							      =				{}
												logger.info('''vision_config is None. Initializing the AlignVisionConfig with default values.'''							)

							UpperCamelCase__     :str							      =				AlignTextConfig(**UpperCamelCase_							)
							UpperCamelCase__     :Dict							      =				AlignVisionConfig(**UpperCamelCase_							)

							UpperCamelCase__     :Optional[Any]							      =				projection_dim
							UpperCamelCase__     :Optional[int]							      =				temperature_init_value
							UpperCamelCase__     :List[Any]							      =				initializer_range




		@classmethod
		def 					lowerCAmelCase__       (	cls					,     UpperCamelCase_					,     UpperCamelCase_					,     **UpperCamelCase_							):

							'''simple docstring'''


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




		def 					lowerCAmelCase__       (	self							):

							'''simple docstring'''


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



'''simple docstring'''
import sys

__snake_case							   =  (
    '''73167176531330624919225119674426574742355349194934'''
    '''96983520312774506326239578318016984801869478851843'''
    '''85861560789112949495459501737958331952853208805511'''
    '''12540698747158523863050715693290963295227443043557'''
    '''66896648950445244523161731856403098711121722383113'''
    '''62229893423380308135336276614282806444486645238749'''
    '''30358907296290491560440772390713810515859307960866'''
    '''70172427121883998797908792274921901699720888093776'''
    '''65727333001053367881220235421809751254540594752243'''
    '''52584907711670556013604839586446706324415722155397'''
    '''53697817977846174064955149290862569321978468622482'''
    '''83972241375657056057490261407972968652414535100474'''
    '''82166370484403199890008895243450658541227588666881'''
    '''16427171479924442928230863465674813919123162824586'''
    '''17866458359124566529476545682848912883142607690042'''
    '''24219022671055626321111109370544217506941658960408'''
    '''07198403850962455444362981230987879927244284909188'''
    '''84580156166097919133875499200524063689912560717606'''
    '''05886116467109405077541002256983155200055935729725'''
    '''71636269561882670428252483600823257530420752963450'''
)


def     a   (    __a     )						->			int:



					'''simple docstring'''






					UpperCamelCase__     :Tuple							      =				1
					for digit in s:
										product *= int(__a     )
					return product


def     a   (    __a = N     )						->			int:



					'''simple docstring'''






					UpperCamelCase__     :Tuple							      =				-sys.maxsize - 1
					UpperCamelCase__     :Dict							      =				n[:13]
					UpperCamelCase__     :Dict							      =				13
					while cur_index < len(__a     ) - 13:
										if int(n[cur_index]     ) >= int(substr[0]     ):
															UpperCamelCase__     :Dict							      =				substr[1:] + n[cur_index]
															cur_index += 1
										else:
															UpperCamelCase__     :List[str]							      =				max(__a				,      str_eval(__a     )     )
															UpperCamelCase__     :Union[str, Any]							      =				n[cur_index : cur_index + 13]
															cur_index += 13
					return largest_product


if __name__ == "__main__":
		print(F"""{solution() = }""")