


def SCREAMING_SNAKE_CASE	(			__lowerCAmelCase = 3							,   __lowerCAmelCase = 7							,   __lowerCAmelCase = 100_0000				)    ->				Optional[Any]:
  snake_case__						= 0
  snake_case__						= 1

  for current_denominator in range(1							,   limit + 1				):
    snake_case__						= current_denominator * numerator // denominator
    if current_denominator % denominator == 0:
      current_numerator -= 1
    if current_numerator * max_denominator > current_denominator * max_numerator:
      snake_case__						= current_numerator
      snake_case__						= current_denominator
  return max_numerator


if __name__ == "__main__":
   print(solution(numerator=3, denominator=7, limit=1_0_0_0_0_0_0))




from math import sqrt





def    __lowerCamelCase      (					UpperCamelCase__ ):







							'''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(sqrt(UpperCamelCase__ ) + 1 )  ,				6 ):
														if number % i == 0 or number % (i + 2) == 0:
																					return False
							return True





def    __lowerCamelCase      (					UpperCamelCase__ = 10001 ):







							'''simple docstring'''






							snake_case_     							=       0
							snake_case_     							=       1
							while count != nth and number < 3:
														number += 1
														if is_prime(UpperCamelCase__ ):
																					count += 1
							while count != nth:
														number += 2
														if is_prime(UpperCamelCase__ ):
																					count += 1
							return number


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




