





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


__lowerCamelCase	:					Any			  =					logging.get_logger(__name__)

__lowerCamelCase	:					Optional[Any]			  =					{
    """facebook/convnextv2-tiny-1k-224""": """https://huggingface.co/facebook/convnextv2-tiny-1k-224/resolve/main/config.json""",
}



class  A__       (	snake_case_	,       snake_case_      ):
      _UpperCAmelCase     :Union[str, Any]						   =       'convnextv2'





      def __init__(			self	,							A_=3	,							A_=4	,							A_=4	,							A_=None	,							A_=None	,							A_="gelu"	,							A_=0.02	,							A_=1e-12	,							A_=0.0	,							A_=224	,							A_=None	,							A_=None	,							**A_	,							):
       '''simple docstring'''




       super().__init__(**A_       )

       UpperCamelCase     : int	     =       num_channels
       UpperCamelCase     : int	     =       patch_size
       UpperCamelCase     : List[str]	     =       num_stages
       UpperCamelCase     : Union[str, Any]	     =       [96, 192, 384, 768] if hidden_sizes is None else hidden_sizes
       UpperCamelCase     : Optional[Any]	     =       [3, 3, 9, 3] if depths is None else depths
       UpperCamelCase     : Any	     =       hidden_act
       UpperCamelCase     : Union[str, Any]	     =       initializer_range
       UpperCamelCase     : Optional[int]	     =       layer_norm_eps
       UpperCamelCase     : List[str]	     =       drop_path_rate
       UpperCamelCase     : Union[str, Any]	     =       image_size
       UpperCamelCase     : int	     =       ["stem"] + [F"""stage{idx}""" for idx in range(1	,							len(self.depths       ) + 1       )]
       UpperCamelCase     ,   UpperCamelCase     : List[str]	     =       get_aligned_output_features_output_indices(
           out_features=A_	,							out_indices=A_	,							stage_names=self.stage_names       )







import math



def 		A_    (					_lowerCAmelCase					)						->			list:
 UpperCamelCase     : str	     =       [True] * n
 UpperCamelCase     : Optional[int]	     =       False
 UpperCamelCase     : str	     =       False
 UpperCamelCase     : List[Any]	     =       True

 for i in range(3							,       int(n**0.5 + 1					)							,       2					):
  UpperCamelCase     : int	     =       i * 2
  while index < n:
   UpperCamelCase     : Optional[Any]	     =       False
   UpperCamelCase     : Optional[Any]	     =       index + i

 UpperCamelCase     : Optional[Any]	     =       [2]

 for i in range(3							,       _lowerCAmelCase							,       2					):
  if is_prime[i]:
   primes.append(_lowerCAmelCase					)

 return primes



def 		A_    (					_lowerCAmelCase = 9999_6666_3333					)						->			int:
 UpperCamelCase     : Tuple	     =       math.floor(math.sqrt(_lowerCAmelCase					)					) + 100
 UpperCamelCase     : Dict	     =       prime_sieve(_lowerCAmelCase					)

 UpperCamelCase     : Optional[Any]	     =       0
 UpperCamelCase     : Tuple	     =       0
 UpperCamelCase     : List[str]	     =       primes[prime_index]

 while (last_prime**2) <= limit:
  UpperCamelCase     : Dict	     =       primes[prime_index + 1]

  UpperCamelCase     : Any	     =       last_prime**2
  UpperCamelCase     : Union[str, Any]	     =       next_prime**2

  # Get numbers divisible by lps(current)
  UpperCamelCase     : Dict	     =       lower_bound + last_prime
  while upper_bound > current <= limit:
   matches_sum += current
   current += last_prime

  # Reset the upper_bound
  while (upper_bound - next_prime) > limit:
   upper_bound -= next_prime

  # Add the numbers divisible by ups(current)
  UpperCamelCase     : List[str]	     =       upper_bound - next_prime
  while current > lower_bound:
   matches_sum += current
   current -= next_prime

  # Remove the numbers divisible by both ups and lps
  UpperCamelCase     : Dict	     =       0
  while upper_bound > current <= limit:
   if current <= lower_bound:
    # Increment the current number
    current += last_prime * next_prime
    continue

   if current > limit:
    break

   # Remove twice since it was added by both ups and lps
   matches_sum -= current * 2

   # Increment the current number
   current += last_prime * next_prime

  # Setup for next pair
  UpperCamelCase     : str	     =       next_prime
  prime_index += 1

 return matches_sum


if __name__ == "__main__":
    print(solution())
