






from __future__ import annotations

from typing import Generic, TypeVar

a__       =     TypeVar("""T""")


class    _lowerCAmelCase			(		Generic[T]      ):



				"""simple docstring"""



				def __init__(      self    :    Optional[Any]			,		UpperCamelCase__    :    str):






											'''simple docstring'''







											snake_case__	  =       data
											snake_case__	  =       self
											snake_case__	  =       0


class    _lowerCAmelCase			(		Generic[T]      ):



				"""simple docstring"""



				def __init__(      self    :    Dict):






											'''simple docstring'''







											snake_case__	  =       {}



				def 					__magic_name__							(      self    :    Optional[Any]			,		UpperCamelCase__    :    Optional[Any]):






											'''simple docstring'''







											snake_case__	  =       DisjointSetTreeNode(UpperCamelCase__)



				def 					__magic_name__							(      self    :    Optional[Any]			,		UpperCamelCase__    :    int):






											'''simple docstring'''







											snake_case__	  =       self.map[data]
											if elem_ref != elem_ref.parent:
																		snake_case__	  =       self.find_set(elem_ref.parent.data)
											return elem_ref.parent



				def 					__magic_name__							(      self    :    Union[str, Any]			,		UpperCamelCase__    :    Optional[Any]			,		UpperCamelCase__    :    str):






											'''simple docstring'''







											if nodea.rank > nodea.rank:
																		snake_case__	  =       nodea
											else:
																		snake_case__	  =       nodea
																		if nodea.rank == nodea.rank:
																									nodea.rank += 1



				def 					__magic_name__							(      self    :    Optional[int]			,		UpperCamelCase__    :    str			,		UpperCamelCase__    :    Union[str, Any]):






											'''simple docstring'''







											self.link(self.find_set(UpperCamelCase__)			,		self.find_set(UpperCamelCase__))


class    _lowerCAmelCase			(		Generic[T]      ):



				"""simple docstring"""



				def __init__(      self    :    str):






											'''simple docstring'''







											snake_case__	  =       {}



				def 					__magic_name__							(      self    :    int			,		UpperCamelCase__    :    Dict):






											'''simple docstring'''







											if node not in self.connections:
																		snake_case__	  =       {}



				def 					__magic_name__							(      self    :    Dict			,		UpperCamelCase__    :    Optional[int]			,		UpperCamelCase__    :    str			,		UpperCamelCase__    :    Optional[int]):






											'''simple docstring'''







											self.add_node(UpperCamelCase__)
											self.add_node(UpperCamelCase__)
											snake_case__	  =       weight
											snake_case__	  =       weight



				def 					__magic_name__							(      self    :    str):






											'''simple docstring'''







											snake_case__	  =       []
											snake_case__	  =       set()
											for start in self.connections:
																		for end in self.connections[start]:
																									if (start, end) not in seen:
																																seen.add((end, start))
																																edges.append((start, end, self.connections[start][end]))
											edges.sort(key=lambda UpperCamelCase__: x[2])

											# creating the disjoint set
											snake_case__	  =       DisjointSetTree[T]()
											for node in self.connections:
																		disjoint_set.make_set(UpperCamelCase__)

											# MST generation
											snake_case__	  =       0
											snake_case__	  =       0
											snake_case__	  =       GraphUndirectedWeighted[T]()
											while num_edges < len(self.connections) - 1:
																		snake_case__  , snake_case__  , snake_case__	  =       edges[index]
																		index += 1
																		snake_case__	  =       disjoint_set.find_set(UpperCamelCase__)
																		snake_case__	  =       disjoint_set.find_set(UpperCamelCase__)
																		if parent_u != parent_v:
																									num_edges += 1
																									graph.add_edge(UpperCamelCase__			,		UpperCamelCase__			,		UpperCamelCase__)
																									disjoint_set.union(UpperCamelCase__			,		UpperCamelCase__)
											return graph








import math
from collections.abc import Iterator
from itertools import takewhile

def _UpperCAmelCase   (	a						:	int ):

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

def _UpperCAmelCase   (	):
							snake_case__	  =       2
							while True:
														if is_prime(a ):
																					yield num
														num += 1

def _UpperCAmelCase   (	a						:	int = 200_0000 ):
							return sum(takewhile(lambda a : x < n  ,					prime_generator() ) )


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