





"""simple docstring"""


from __future__ import annotations

def      UpperCamelCase							(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE     ):
						if len(SCREAMING_SNAKE_CASE     ) == 0:
												raise ValueError("""find_max() arg is an empty sequence"""     )
						if (
						    left >= len(SCREAMING_SNAKE_CASE     )
						    or left < -len(SCREAMING_SNAKE_CASE     )
						    or right >= len(SCREAMING_SNAKE_CASE     )
						    or right < -len(SCREAMING_SNAKE_CASE     )
						):
												raise IndexError("""list index out of range"""     )
						if left == right:
												return nums[left]
						UpperCamelCase				:		Tuple				   =			(left + right) >> 1  # the middle
						UpperCamelCase				:		Optional[Any]				   =			find_max(SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE							,     SCREAMING_SNAKE_CASE     )  # find max in range[left, mid]
						UpperCamelCase				:		List[Any]				   =			find_max(SCREAMING_SNAKE_CASE							,     mid + 1							,     SCREAMING_SNAKE_CASE     )  # find max in range[mid + 1, right]

						return left_max if left_max >= right_max else right_max


if __name__ == "__main__":
		import doctest

		doctest.testmod(verbose=True)











"""simple docstring"""
from __future__ import annotations

from collections.abc import Generator





def 				lowercase__		(					):
				_SCREAMING_SNAKE_CASE   :		dict[int, int]       		=    {}
				_SCREAMING_SNAKE_CASE   :		List[Any]       		=    2
				while True:
								_SCREAMING_SNAKE_CASE   :		List[Any]       		=    factor_map.pop(lowerCamelCase,						lowerCamelCase       )
								if factor:
												_SCREAMING_SNAKE_CASE   :		str       		=    factor + prime
												while x in factor_map:
																x += factor
												_SCREAMING_SNAKE_CASE   :		Union[str, Any]       		=    factor
								else:
												_SCREAMING_SNAKE_CASE   :		Optional[int]       		=    prime
												yield prime
								prime += 1





def 				lowercase__		(					lowerCamelCase = 1E10       ):
				_SCREAMING_SNAKE_CASE   :		Dict       		=    sieve()

				_SCREAMING_SNAKE_CASE   :		Dict       		=    1
				while True:
								_SCREAMING_SNAKE_CASE   :		int       		=    next(lowerCamelCase       )
								if (2 * prime * n) > limit:
												return n
								# Ignore the next prime as the reminder will be 2.
								next(lowerCamelCase       )
								n += 2


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

