
"""simple docstring"""




from __future__ import annotations

from collections.abc import Generator

def lowercase_  (   ):
							SCREAMING_SNAKE_CASE__						:       dict[int, int]           =   {}
							SCREAMING_SNAKE_CASE__						:       Union[str, Any]           =   2
							while True:
														SCREAMING_SNAKE_CASE__						:       str           =   factor_map.pop(_snake_case   ,_snake_case						)
														if factor:
																					SCREAMING_SNAKE_CASE__						:       List[str]           =   factor + prime
																					while x in factor_map:
																												x += factor
																					SCREAMING_SNAKE_CASE__						:       Tuple           =   factor
														else:
																					SCREAMING_SNAKE_CASE__						:       str           =   prime
																					yield prime
														prime += 1

def lowercase_  (   _snake_case = 1E10						):
							SCREAMING_SNAKE_CASE__						:       List[str]           =   sieve()

							SCREAMING_SNAKE_CASE__						:       Union[str, Any]           =   1
							while True:
														SCREAMING_SNAKE_CASE__						:       List[str]           =   next(_snake_case						)
														if (2 * prime * n) > limit:
																					return n
														# Ignore the next prime as the reminder will be 2.
														next(_snake_case						)
														n += 2


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






"""simple docstring"""




def lowercase_  (   _snake_case						):
							SCREAMING_SNAKE_CASE__						:       Optional[int]           =   [1]

							SCREAMING_SNAKE_CASE__      ,      SCREAMING_SNAKE_CASE__      ,      SCREAMING_SNAKE_CASE__						:       str           =   0, 0, 0
							SCREAMING_SNAKE_CASE__						:       List[str]           =   ugly_nums[ia] * 2
							SCREAMING_SNAKE_CASE__						:       int           =   ugly_nums[ia] * 3
							SCREAMING_SNAKE_CASE__						:       Any           =   ugly_nums[ia] * 5

							for _ in range(1   ,_snake_case						):
														SCREAMING_SNAKE_CASE__						:       Union[str, Any]           =   min(_snake_case   ,_snake_case   ,_snake_case						)
														ugly_nums.append(_snake_case						)
														if next_num == next_a:
																					ia += 1
																					SCREAMING_SNAKE_CASE__						:       Optional[int]           =   ugly_nums[ia] * 2
														if next_num == next_a:
																					ia += 1
																					SCREAMING_SNAKE_CASE__						:       List[str]           =   ugly_nums[ia] * 3
														if next_num == next_a:
																					ia += 1
																					SCREAMING_SNAKE_CASE__						:       Tuple           =   ugly_nums[ia] * 5
							return ugly_nums[-1]


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

					testmod(verbose=True)
					print(f"""{ugly_numbers(2_0_0) = }""")




