





"""simple docstring"""






from math import sqrt

def     __A      (			a_						:int)		->		bool:

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

def     __A      (			a_						:int = 1_00_01)		->		int:
				__a :						str			       =  0
				__a :						Tuple			       =  1
				while count != nth and number < 3:
								number += 1
								if is_prime(a_):
												count += 1
				while count != nth:
								number += 2
								if is_prime(a_):
												count += 1
				return number


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






"""simple docstring"""






from __future__ import annotations

from collections import deque
from collections.abc import Iterator
from dataclasses import dataclass




@dataclass
class 				__lowercase			:







					'''simple docstring'''




					__lowerCAmelCase  =  42
					__lowerCAmelCase  =  42






class 				__lowercase			:







					'''simple docstring'''




					def __init__(						self	,			_UpperCAmelCase     ):
									__a :						list[list[Edge]]			       =  [[] for _ in range(_UpperCAmelCase     )]
									__a :						Dict			       =  size







					def __getitem__(						self	,			_UpperCAmelCase     ):
									return iter(self._graph[vertex]     )







					@property
					def  _lowerCamelCase		(						self     ):
									return self._size







					def  _lowerCamelCase		(						self	,			_UpperCAmelCase	,			_UpperCAmelCase	,			_UpperCAmelCase     ):
									if weight not in (0, 1):
													raise ValueError('''Edge weight must be either 0 or 1.'''     )

									if to_vertex < 0 or to_vertex >= self.size:
													raise ValueError('''Vertex indexes must be in [0; size).'''     )

									self._graph[from_vertex].append(Edge(_UpperCAmelCase	,			_UpperCAmelCase     )     )







					def  _lowerCamelCase		(						self	,			_UpperCAmelCase	,			_UpperCAmelCase     ):
									__a :						List[str]			       =  deque([start_vertex]     )
									__a :						list[int | None]			       =  [None] * self.size
									__a :						int			       =  0

									while queue:
													__a :						Any			       =  queue.popleft()
													__a :						Tuple			       =  distances[current_vertex]
													if current_distance is None:
																	continue

													for edge in self[current_vertex]:
																	__a :						List[str]			       =  current_distance + edge.weight
																	__a :						str			       =  distances[edge.destination_vertex]
																	if (
																	    isinstance(_UpperCAmelCase	,			_UpperCAmelCase     )
																	    and new_distance >= dest_vertex_distance
																	):
																					continue
																	__a :						str			       =  new_distance
																	if edge.weight == 0:
																					queue.appendleft(edge.destination_vertex     )
																	else:
																					queue.append(edge.destination_vertex     )

									if distances[finish_vertex] is None:
													raise ValueError('''No path from start_vertex to finish_vertex.'''     )

									return distances[finish_vertex]


if __name__ == "__main__":
		import doctest

		doctest.testmod()