






from math import sqrt




def 				A		(					lowercase__  :  int = 100_0000  )		-> int:
	UpperCamelCase__ :int						=      0
	UpperCamelCase__ :int						=      0
	UpperCamelCase__ :int

	while num_cuboids <= limit:
		max_cuboid_size += 1
		for sum_shortest_sides in range(2 ,		2 * max_cuboid_size + 1  ):
			if sqrt(sum_shortest_sides**2 + max_cuboid_size**2  ).is_integer():
				num_cuboids += (
				    min(lowercase__ ,		sum_shortest_sides // 2  )
				    - max(1 ,		sum_shortest_sides - max_cuboid_size  )
				    + 1
				)

	return max_cuboid_size


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




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


__snake_case     :Optional[Any]			       =logging.get_logger(__name__)

__snake_case     :Tuple			       ={
    'transfo-xl-wt103': 'https://huggingface.co/transfo-xl-wt103/resolve/main/config.json',
}



class        lowerCAmelCase__					(  _lowerCamelCase       ):
				A_   :     Any								=     'transfo-xl'
				A_   :     Dict								=     ['mems']
				A_   :     int								=     {
				    'n_token': 'vocab_size',
				    'hidden_size': 'd_model',
				    'num_attention_heads': 'n_head',
				    'num_hidden_layers': 'n_layer',
				}


				def __init__(							self      :  Optional[Any]						, __UpperCamelCase      :  str=267_735						, __UpperCamelCase      :  int=[20_000, 40_000, 200_000]						, __UpperCamelCase      :  List[str]=1_024						, __UpperCamelCase      :  Union[str, Any]=1_024						, __UpperCamelCase      :  Optional[Any]=16						, __UpperCamelCase      :  Dict=64						, __UpperCamelCase      :  Optional[Any]=4_096						, __UpperCamelCase      :  int=4						, __UpperCamelCase      :  List[str]=False						, __UpperCamelCase      :  Optional[int]=18						, __UpperCamelCase      :  int=1_600						, __UpperCamelCase      :  Dict=1_000						, __UpperCamelCase      :  Optional[Any]=True						, __UpperCamelCase      :  Optional[Any]=True						, __UpperCamelCase      :  Optional[Any]=0						, __UpperCamelCase      :  Any=-1						, __UpperCamelCase      :  Any=True						, __UpperCamelCase      :  List[Any]=0.1						, __UpperCamelCase      :  str=0.0						, __UpperCamelCase      :  Dict=True						, __UpperCamelCase      :  int="normal"						, __UpperCamelCase      :  List[Any]=0.0_1						, __UpperCamelCase      :  str=0.0_1						, __UpperCamelCase      :  Any=0.0_2						, __UpperCamelCase      :  str=1e-5						, __UpperCamelCase      :  Optional[int]=0						, **__UpperCamelCase      :  Any						, )		->     int:
											A      						=    vocab_size
											A      						=    []
											self.cutoffs.extend(__UpperCamelCase       )
											if proj_share_all_but_first:
																		A      						=    [False] + [True] * len(self.cutoffs       )
											else:
																		A      						=    [False] + [False] * len(self.cutoffs       )
											A      						=    d_model
											A      						=    d_embed
											A      						=    d_head
											A      						=    d_inner
											A      						=    div_val
											A      						=    pre_lnorm
											A      						=    n_layer
											A      						=    n_head
											A      						=    mem_len
											A      						=    same_length
											A      						=    attn_type
											A      						=    clamp_len
											A      						=    sample_softmax
											A      						=    adaptive
											A      						=    dropout
											A      						=    dropatt
											A      						=    untie_r
											A      						=    init
											A      						=    init_range
											A      						=    proj_init_std
											A      						=    init_std
											A      						=    layer_norm_epsilon
											super().__init__(eos_token_id=__UpperCamelCase						, **__UpperCamelCase       )


				@property
				def __UpperCamelCase						(							self      :  Any       )		->     Optional[int]:
											# Message copied from Transformer-XL documentation
											logger.info(f'''The model {self.model_type} is one of the few models that has no sequence length limit.'''       )
											return -1


				@max_position_embeddings.setter
				def __UpperCamelCase						(							self      :  List[Any]						, __UpperCamelCase      :  List[Any]       )		->     List[Any]:
											# Message copied from Transformer-XL documentation
											raise NotImplementedError(
											    f'''The model {self.model_type} is one of the few models that has no sequence length limit.'''       )