




"""simple docstring"""


import math


def 					UpperCAmelCase__       (snake_case__							:					int    ):
  """simple docstring"""

  _snake_case							:		Dict								=  [True] * n
  _snake_case							:		List[str]								=  False
  _snake_case							:		Optional[int]								=  False
  _snake_case							:		Any								=  True

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

  _snake_case							:		List[str]								=  [2]

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

  return primes


def 					UpperCAmelCase__       (snake_case__							:					int = 99_99_66_66_33_33    ):
  """simple docstring"""

  _snake_case							:		Optional[Any]								=  math.floor(math.sqrt(snake_case__    )    ) + 1_00
  _snake_case							:		List[str]								=  prime_sieve(snake_case__    )

  _snake_case							:		Optional[int]								=  0
  _snake_case							:		Optional[int]								=  0
  _snake_case							:		Union[str, Any]								=  primes[prime_index]

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

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

    # Get numbers divisible by lps(current)
    _snake_case							:		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)
    _snake_case							:		Union[str, Any]								=  upper_bound - next_prime
    while current > lower_bound:
      matches_sum += current
      current -= next_prime

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

  return matches_sum


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






'''simple docstring'''


UpperCAmelCase_		:   Union[str, Any]							   =		'\n# Transformers installation\n! pip install transformers datasets\n# To install from source instead of the last release, comment the command above and uncomment the following one.\n# ! pip install git+https://github.com/huggingface/transformers.git\n'

UpperCAmelCase_		:   Dict							   =		[{'type': 'code', 'content': INSTALL_CONTENT}]
UpperCAmelCase_		:   Any							   =		{
    '{processor_class}': 'FakeProcessorClass',
    '{model_class}': 'FakeModelClass',
    '{object_class}': 'FakeObjectClass',
}




