



import math






def 					__lowerCAmelCase		(  __lowerCamelCase	:    int	)  ->						list:
					__lowerCAmelCase	   =[True] * n
					__lowerCAmelCase	   =False
					__lowerCAmelCase	   =False
					__lowerCAmelCase	   =True

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

					__lowerCAmelCase	   =[2]

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

					return primes






def 					__lowerCAmelCase		(  __lowerCamelCase	:    int = 999966663333	)  ->						int:
					__lowerCAmelCase	   =math.floor(math.sqrt(__lowerCamelCase	)	) + 100
					__lowerCAmelCase	   =prime_sieve(__lowerCamelCase	)

					__lowerCAmelCase	   =0
					__lowerCAmelCase	   =0
					__lowerCAmelCase	   =primes[prime_index]

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

										__lowerCAmelCase	   =last_prime**2
										__lowerCAmelCase	   =next_prime**2

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

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

					return matches_sum


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









import math

from numpy import inf
from scipy.integrate import quad






def 					__lowerCAmelCase		(  __lowerCamelCase	:    float	)  ->						float:
					if num <= 0:
										raise ValueError("""math domain error"""	)

					return quad(__lowerCamelCase				,   0				,   __lowerCamelCase				,   args=(__lowerCamelCase)	)[0]






def 					__lowerCAmelCase		(  __lowerCamelCase	:    float				,   __lowerCamelCase	:    float	)  ->						float:
					return math.pow(__lowerCamelCase				,   z - 1	) * math.exp(-x	)


if __name__ == "__main__":
				from doctest import testmod

				testmod()




