






"""simple docstring"""







import math

def _a					(						_snake_case				):







      """simple docstring"""






      UpperCAmelCase							     =			[True] * n
      UpperCAmelCase							     =			False
      UpperCAmelCase							     =			False
      UpperCAmelCase							     =			True

      for i in range(3 ,			int(n**0.5 + 1				) ,			2				):
            UpperCAmelCase							     =			i * 2
            while index < n:
                  UpperCAmelCase							     =			False
                  UpperCAmelCase							     =			index + i

      UpperCAmelCase							     =			[2]

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

      return primes

def _a					(						_snake_case = 9999_6666_3333				):







      """simple docstring"""






      UpperCAmelCase							     =			math.floor(math.sqrt(_snake_case				)				) + 100
      UpperCAmelCase							     =			prime_sieve(_snake_case				)

      UpperCAmelCase							     =			0
      UpperCAmelCase							     =			0
      UpperCAmelCase							     =			primes[prime_index]

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

            UpperCAmelCase							     =			last_prime**2
            UpperCAmelCase							     =			next_prime**2

            # Get numbers divisible by lps(current)
            UpperCAmelCase							     =			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							     =			upper_bound - next_prime
            while current > lower_bound:
                  matches_sum += current
                  current -= next_prime

            # Remove the numbers divisible by both ups and lps
            UpperCAmelCase							     =			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							     =			next_prime
            prime_index += 1

      return matches_sum


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





import unittest

from transformers import load_tool

from .test_tools_common import ToolTesterMixin

class 							_UpperCamelCase					(       unittest.TestCase  ,							_A	):






			'''simple docstring'''

			def    lowerCAmelCase__						(							self			:							Tuple   ):
							UpperCamelCase_:				List[Any]						=    load_tool("""text-classification"""   )
							self.tool.setup()
							UpperCamelCase_:				Optional[int]						=    load_tool("""text-classification"""    ,						remote=snake_case_   )

			def    lowerCAmelCase__						(							self			:							Optional[Any]   ):
							UpperCamelCase_:				Union[str, Any]						=    self.tool("""That's quite cool"""    ,						["""positive""", """negative"""]   )
							self.assertEqual(snake_case_    ,						"""positive"""   )

			def    lowerCAmelCase__						(							self			:							int   ):
							UpperCamelCase_:				Tuple						=    self.remote_tool("""That's quite cool"""    ,						["""positive""", """negative"""]   )
							self.assertEqual(snake_case_    ,						"""positive"""   )

			def    lowerCAmelCase__						(							self			:							Optional[int]   ):
							UpperCamelCase_:				int						=    self.tool(text="""That's quite cool"""    ,						labels=["""positive""", """negative"""]   )
							self.assertEqual(snake_case_    ,						"""positive"""   )




			def    lowerCAmelCase__						(							self			:							Tuple   ):
							UpperCamelCase_:				List[Any]						=    self.remote_tool(text="""That's quite cool"""    ,						labels=["""positive""", """negative"""]   )
							self.assertEqual(snake_case_    ,						"""positive"""   )






