


'''simple docstring'''



def 			UpperCAmelCase__					(	UpperCAmelCase_    :				str      ,    UpperCAmelCase_    :				Any      ,    UpperCAmelCase_    :				Union[str, Any]							)     ->		List[str]:
     if n == 0:
          return 1

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

     else:
          __lowerCamelCase   :	Union[str, Any]								=		binary_exponentiation(UpperCAmelCase_      ,    n / 2      ,    UpperCAmelCase_							)
          return (b * b) % mod


# a prime number
A__		:					List[str]												=  701

A__		:					Optional[int]												=  1000000000
A__		:					Optional[Any]												=  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)










'''simple docstring'''



from math import isqrt



def 			UpperCAmelCase__					(	UpperCAmelCase_    :				int							)     ->		bool:
     return all(number % divisor != 0 for divisor in range(2      ,    isqrt(UpperCAmelCase_							) + 1							)							)



def 			UpperCAmelCase__					(	UpperCAmelCase_    :				int = 10**6							)     ->		int:
     __lowerCamelCase   :	Optional[Any]								=		0
     __lowerCamelCase   :	Optional[int]								=		1
     __lowerCamelCase   :	List[str]								=		7
     while prime_candidate < max_prime:
          primes_count += is_prime(UpperCAmelCase_							)

          cube_index += 1
          prime_candidate += 6 * cube_index

     return primes_count


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






