


'''simple docstring'''



import math




def      _a     (						_lowercase :     int  ):





     '''simple docstring'''






     __UpperCAmelCase     :			Tuple  							=      [True] * n
     __UpperCAmelCase     :			Union[str, Any]  							=      False
     __UpperCAmelCase     :			Any  							=      False
     __UpperCAmelCase     :			int  							=      True

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

     __UpperCAmelCase     :			List[Any]  							=      [2]

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

     return primes




def      _a     (						_lowercase :     int = 999966663333  ):





     '''simple docstring'''






     __UpperCAmelCase     :			str  							=      math.floor(math.sqrt(_lowercase  )  ) + 100
     __UpperCAmelCase     :			Union[str, Any]  							=      prime_sieve(_lowercase  )

     __UpperCAmelCase     :			Optional[int]  							=      0
     __UpperCAmelCase     :			Tuple  							=      0
     __UpperCAmelCase     :			Dict  							=      primes[prime_index]

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

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

          # Get numbers divisible by lps(current)
          __UpperCAmelCase     :			int  							=      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     :			Optional[Any]  							=      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     :			List[Any]  							=      next_prime
          prime_index += 1

     return matches_sum


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



'''simple docstring'''



from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


__UpperCAmelCase      :List[Any]			    =       {
    "configuration_lxmert": ["LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP", "LxmertConfig"],
    "tokenization_lxmert": ["LxmertTokenizer"],
}

try:
      if not is_tokenizers_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __UpperCAmelCase      :List[Any]			    =       ["LxmertTokenizerFast"]

try:
      if not is_torch_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __UpperCAmelCase      :List[Any]			    =       [
          "LxmertEncoder",
          "LxmertForPreTraining",
          "LxmertForQuestionAnswering",
          "LxmertModel",
          "LxmertPreTrainedModel",
          "LxmertVisualFeatureEncoder",
          "LxmertXLayer",
      ]

try:
      if not is_tf_available():
            raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
      pass
else:
      __UpperCAmelCase      :List[str]			    =       [
          "TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST",
          "TFLxmertForPreTraining",
          "TFLxmertMainLayer",
          "TFLxmertModel",
          "TFLxmertPreTrainedModel",
          "TFLxmertVisualFeatureEncoder",
      ]


if TYPE_CHECKING:
      from .configuration_lxmert import LXMERT_PRETRAINED_CONFIG_ARCHIVE_MAP, LxmertConfig
      from .tokenization_lxmert import LxmertTokenizer

      try:
            if not is_tokenizers_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .tokenization_lxmert_fast import LxmertTokenizerFast

      try:
            if not is_torch_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_lxmert import (
                LxmertEncoder,
                LxmertForPreTraining,
                LxmertForQuestionAnswering,
                LxmertModel,
                LxmertPreTrainedModel,
                LxmertVisualFeatureEncoder,
                LxmertXLayer,
            )

      try:
            if not is_tf_available():
                  raise OptionalDependencyNotAvailable()
      except OptionalDependencyNotAvailable:
            pass
      else:
            from .modeling_tf_lxmert import (
                TF_LXMERT_PRETRAINED_MODEL_ARCHIVE_LIST,
                TFLxmertForPreTraining,
                TFLxmertMainLayer,
                TFLxmertModel,
                TFLxmertPreTrainedModel,
                TFLxmertVisualFeatureEncoder,
            )

else:
      import sys

      __UpperCAmelCase      :int			    =       _LazyModule(__name__, globals()["__file__"], _import_structure, module_spec=__spec__)