"""simple docstring"""


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


lowerCamelCase__				  =   logging.get_logger(__name__)

lowerCamelCase__				  =   {
    "facebook/s2t-small-librispeech-asr": (
        "https://huggingface.co/facebook/s2t-small-librispeech-asr/resolve/main/config.json"
    ),
    # See all Speech2Text models at https://huggingface.co/models?filter=speech_to_text
}



class      __SCREAMING_SNAKE_CASE    (						_UpperCamelCase   ):







  '''simple docstring'''


  SCREAMING_SNAKE_CASE__							:Union[str, Any]	     =					"speech_to_text"
  SCREAMING_SNAKE_CASE__							:Any	     =					["past_key_values"]
  SCREAMING_SNAKE_CASE__							:int	     =					{"num_attention_heads": "encoder_attention_heads", "hidden_size": "d_model"}

  def __init__(		self   :       Any					,   __a   :       Optional[int]=1_0000					,   __a   :       Optional[Any]=12					,   __a   :       Optional[int]=2048					,   __a   :       Optional[int]=4					,   __a   :       List[Any]=6					,   __a   :       Optional[Any]=2048					,   __a   :       List[str]=4					,   __a   :       Dict=0.0					,   __a   :       Union[str, Any]=0.0					,   __a   :       Union[str, Any]=True					,   __a   :       int=True					,   __a   :       Union[str, Any]="relu"					,   __a   :       Union[str, Any]=256					,   __a   :       List[str]=0.1					,   __a   :       Any=0.0					,   __a   :       Any=0.0					,   __a   :       List[str]=0.02					,   __a   :       List[str]=2					,   __a   :       Optional[int]=True					,   __a   :       int=1					,   __a   :       Optional[int]=0					,   __a   :       Dict=2					,   __a   :       Tuple=6000					,   __a   :       Optional[Any]=1024					,   __a   :       Union[str, Any]=2					,   __a   :       str=(5, 5)					,   __a   :       Dict=1024					,   __a   :       List[Any]=80					,   __a   :       Dict=1					,   **__a   :       Optional[int]					,   )		->				Optional[int]:
        _UpperCamelCase      :	List[str]						=       vocab_size
        _UpperCamelCase      :	Any						=       d_model
        _UpperCamelCase      :	Tuple						=       encoder_ffn_dim
        _UpperCamelCase      :	List[str]						=       encoder_layers
        _UpperCamelCase      :	str						=       encoder_attention_heads
        _UpperCamelCase      :	List[str]						=       decoder_ffn_dim
        _UpperCamelCase      :	Any						=       decoder_layers
        _UpperCamelCase      :	List[str]						=       decoder_attention_heads
        _UpperCamelCase      :	Union[str, Any]						=       dropout
        _UpperCamelCase      :	List[str]						=       attention_dropout
        _UpperCamelCase      :	Optional[int]						=       activation_dropout
        _UpperCamelCase      :	int						=       activation_function
        _UpperCamelCase      :	Dict						=       init_std
        _UpperCamelCase      :	List[Any]						=       encoder_layerdrop
        _UpperCamelCase      :	Optional[int]						=       decoder_layerdrop
        _UpperCamelCase      :	List[str]						=       use_cache
        _UpperCamelCase      :	str						=       encoder_layers
        _UpperCamelCase      :	Dict						=       scale_embedding  # scale factor will be sqrt(d_model) if True
        _UpperCamelCase      :	Any						=       max_source_positions
        _UpperCamelCase      :	Optional[Any]						=       max_target_positions
        _UpperCamelCase      :	Optional[Any]						=       num_conv_layers
        _UpperCamelCase      :	Tuple						=       list(__a	)
        _UpperCamelCase      :	Optional[int]						=       conv_channels
        _UpperCamelCase      :	List[Any]						=       input_feat_per_channel
        _UpperCamelCase      :	List[str]						=       input_channels

        if len(self.conv_kernel_sizes	) != self.num_conv_layers:
              raise ValueError(
                  "Configuration for convolutional module is incorrect. "
                  "It is required that `len(config.conv_kernel_sizes)` == `config.num_conv_layers` "
                  F'''but is `len(config.conv_kernel_sizes) = {len(self.conv_kernel_sizes	)}`, '''
                  F'''`config.num_conv_layers = {self.num_conv_layers}`.'''	)

        super().__init__(
            pad_token_id=__a					,   bos_token_id=__a					,   eos_token_id=__a					,   is_encoder_decoder=__a					,   decoder_start_token_id=__a					,   **__a					,   )







"""simple docstring"""


from collections import defaultdict
from math import ceil, sqrt




def 					lowercase__    (					lowercase_ = 1_000_000		,lowercase_ = 10			)					->		int:




      """simple docstring"""

      _UpperCamelCase      :	defaultdict						=       defaultdict(lowercase_			)

      for outer_width in range(3		,(t_limit // 4) + 2			):
            if outer_width * outer_width > t_limit:
                  _UpperCamelCase      :	Any						=       max(
                      ceil(sqrt(outer_width * outer_width - t_limit			)			)		,1			)
            else:
                  _UpperCamelCase      :	str						=       1

            hole_width_lower_bound += (outer_width - hole_width_lower_bound) % 2

            for hole_width in range(lowercase_		,outer_width - 1		,2			):
                  count[outer_width * outer_width - hole_width * hole_width] += 1

      return sum(1 for n in count.values() if 1 <= n <= 10			)


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