



def  UpperCamelCase						(       _A			:				List[str]			,							_A			:				Union[str, Any]			,							_A			:				Dict    )->       Tuple:





						"""simple docstring"""





						if n == 0:
												return 1

						elif n % 2 == 1:
												return (binary_exponentiation(_A			,							n - 1			,							_A    ) * a) % mod

						else:
												A__							=       binary_exponentiation(_A			,							n / 2			,							_A    )
												return (b * b) % mod


# a prime number
UpperCAmelCase_							:      Optional[Any]      =  701

UpperCAmelCase_							:      str      =  1_000_000_000
UpperCAmelCase_							:      int      =  10

# using binary exponentiation function, O(log(p)):
print((a / b) % p == (a * binary_exponentiation(b, p - 2, p)) % p)
print((a / b) % p == (a * b ** (p - 2)) % p)










import math
from collections.abc import Iterator
from itertools import takewhile
def  UpperCamelCase						(       _A			:				int    )->       bool:





						"""simple docstring"""





						if 1 < number < 4:
												# 2 and 3 are primes
												return True
						elif number < 2 or number % 2 == 0 or number % 3 == 0:
												# Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
												return False

						# All primes number are in format of 6k +/- 1
						for i in range(5			,							int(math.sqrt(_A    ) + 1    )			,							6    ):
												if number % i == 0 or number % (i + 2) == 0:
																		return False
						return True
def  UpperCamelCase						(       )->       Iterator[int]:





						"""simple docstring"""





						A__							=       2
						while True:
												if is_prime(_A    ):
																		yield num
												num += 1
def  UpperCamelCase						(       _A			:				int = 2000000    )->       int:





						"""simple docstring"""





						return sum(takewhile(lambda _A    : x < n			,							prime_generator()    )    )


if __name__ == "__main__":
						print(F'''{solution() = }''')





