




from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ...utils.backbone_utils import BackboneConfigMixin, get_aligned_output_features_output_indices


_snake_case            = logging.get_logger(__name__)

_snake_case            = {
    "shi-labs/nat-mini-in1k-224": "https://huggingface.co/shi-labs/nat-mini-in1k-224/resolve/main/config.json",
    # See all Nat models at https://huggingface.co/models?filter=nat
}







class 		lowercase							(     UpperCamelCase__,UpperCamelCase__	):
					_a											=		"nat"

					_a											=		{
					    "num_attention_heads": "num_heads",
					    "num_hidden_layers": "num_layers",
					}

					def __init__(						self	,  _a=4	,  _a=3	,  _a=64	,  _a=[3, 4, 6, 5]	,  _a=[2, 4, 8, 16]	,  _a=7	,  _a=3.0	,  _a=True	,  _a=0.0	,  _a=0.0	,  _a=0.1	,  _a="gelu"	,  _a=0.02	,  _a=1e-5	,  _a=0.0	,  _a=None	,  _a=None	,  **_a	,  )		->							Any:
											super().__init__(**lowercase_       )

											_A							:  Optional[int]    =		patch_size
											_A							:  Optional[Any]    =		num_channels
											_A							:  Tuple    =		embed_dim
											_A							:  Union[str, Any]    =		depths
											_A							:  Any    =		len(lowercase_       )
											_A							:  List[Any]    =		num_heads
											_A							:  Optional[int]    =		kernel_size
											_A							:  Any    =		mlp_ratio
											_A							:  Any    =		qkv_bias
											_A							:  str    =		hidden_dropout_prob
											_A							:  Union[str, Any]    =		attention_probs_dropout_prob
											_A							:  Optional[Any]    =		drop_path_rate
											_A							:  List[str]    =		hidden_act
											_A							:  Optional[int]    =		layer_norm_eps
											_A							:  List[Any]    =		initializer_range
											# we set the hidden_size attribute in order to make Nat work with VisionEncoderDecoderModel
											# this indicates the channel dimension after the last stage of the model
											_A							:  Optional[Any]    =		int(embed_dim * 2 ** (len(lowercase_       ) - 1)       )
											_A							:  Tuple    =		layer_scale_init_value
											_A							:  List[str]    =		["""stem"""] + [F'''stage{idx}''' for idx in range(1	,  len(lowercase_       ) + 1       )]
											_A    ,     _A							:  Tuple    =		get_aligned_output_features_output_indices(
											    out_features=lowercase_	,  out_indices=lowercase_	,  stage_names=self.stage_names       )







def        lowerCAmelCase_			(  snake_case_ = 1000000  ):
      _A							:  Any    =		limit + 1
      _A							:  Tuple    =		[0] * limit
      for first_term in range(1,snake_case_  ):
            for n in range(snake_case_,snake_case_,snake_case_  ):
                  _A							:  Optional[int]    =		first_term + n / first_term
                  if common_difference % 4:  # d must be divisble by 4
                        continue
                  else:
                        common_difference /= 4
                        if (
                            first_term > common_difference
                            and first_term < 4 * common_difference
                        ):  # since x,y,z are positive integers
                              frequency[n] += 1  # so z>0 and a>d ,also 4d<a

      _A							:  List[str]    =		sum(1 for x in frequency[1:limit] if x == 10  )

      return count


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

