



'''simple docstring'''
import math






def A__   (					UpperCAmelCase_							):
						_UpperCamelCase :		List[Any]			    =       [True] * n
						_UpperCamelCase :		Union[str, Any]			    =       False
						_UpperCamelCase :		Union[str, Any]			    =       False
						_UpperCamelCase :		Optional[Any]			    =       True

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

						_UpperCamelCase :		Dict			    =       [2]

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

						return primes






def A__   (					UpperCAmelCase_ = 9_9_9_9_6_6_6_6_3_3_3_3							):
						_UpperCamelCase :		Union[str, Any]			    =       math.floor(math.sqrt(UpperCAmelCase_							)							) + 1_0_0
						_UpperCamelCase :		Dict			    =       prime_sieve(UpperCAmelCase_							)

						_UpperCamelCase :		Dict			    =       0
						_UpperCamelCase :		Any			    =       0
						_UpperCamelCase :		str			    =       primes[prime_index]

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

												_UpperCamelCase :		List[Any]			    =       last_prime**2
												_UpperCamelCase :		List[Any]			    =       next_prime**2

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

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

						return matches_sum


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







'''simple docstring'''
from abc import ABC, abstractmethod
from argparse import ArgumentParser






class 							lowercase__     (							lowercase       ):





	@staticmethod
	@abstractmethod
	def      UpperCamelCase_  (			lowerCamelCase__ :    ArgumentParser			):







							'''simple docstring'''
							raise NotImplementedError()





	@abstractmethod
	def      UpperCamelCase_  (			self :    Any			):







							'''simple docstring'''
							raise NotImplementedError()


