





import math


def     SCREAMING_SNAKE_CASE			(      lowerCAmelCase					):
       _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    ,       lowerCAmelCase    ,       2					):
              if is_prime[i]:
                     primes.append(lowerCAmelCase					)

       return primes


def     SCREAMING_SNAKE_CASE			(      lowerCAmelCase = 999_966_663_333					):
       _UpperCamelCase              =						math.floor(math.sqrt(lowerCAmelCase					)					) + 100
       _UpperCamelCase              =						prime_sieve(lowerCAmelCase					)

       _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())













def     SCREAMING_SNAKE_CASE			(      lowerCAmelCase    ,       lowerCAmelCase    ,       lowerCAmelCase = 0    ,       lowerCAmelCase = 0					):
       _UpperCamelCase              =						right or len(lowerCAmelCase					) - 1
       if left > right:
              return -1
       elif list_data[left] == key:
              return left
       elif list_data[right] == key:
              return right
       else:
              return search(lowerCAmelCase    ,       lowerCAmelCase    ,       left + 1    ,       right - 1					)


if __name__ == "__main__":
       import doctest

       doctest.testmod()






