




from __future__ import annotations

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



@dataclass
class    lowercase_		:
						lowerCAmelCase__			      =42
						lowerCAmelCase__			      =42



class    lowercase_		:



						def __init__(			self	:   Tuple					,							snake_case__	:   int  ):

								"""simple docstring"""

								SCREAMING_SNAKE_CASE_					      =							[[] for _ in range(snake_case__  )]
								SCREAMING_SNAKE_CASE_					      =							size



						def __getitem__(			self	:   Optional[Any]					,							snake_case__	:   int  ):

								"""simple docstring"""

								return iter(self._graph[vertex]  )



						@property
						def 	__a					(			self	:   str  ):

								"""simple docstring"""

								return self._size



						def 	__a					(			self	:   List[Any]					,							snake_case__	:   int					,							snake_case__	:   int					,							snake_case__	:   int  ):

								"""simple docstring"""

								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(snake_case__					,							snake_case__  )  )






						def 	__a					(			self	:   str					,							snake_case__	:   int					,							snake_case__	:   int  ):

								"""simple docstring"""

								SCREAMING_SNAKE_CASE_					      =							deque([start_vertex]  )
								SCREAMING_SNAKE_CASE_					      =							[None] * self.size
								SCREAMING_SNAKE_CASE_					      =							0

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

										for edge in self[current_vertex]:
												SCREAMING_SNAKE_CASE_					      =							current_distance + edge.weight
												SCREAMING_SNAKE_CASE_					      =							distances[edge.destination_vertex]
												if (
												    isinstance(snake_case__					,							snake_case__  )
												    and new_distance >= dest_vertex_distance
												):
														continue
												SCREAMING_SNAKE_CASE_					      =							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()





from math import isqrt


def 					_a							(					lowerCAmelCase )->	bool:
		return all(number % divisor != 0 for divisor in range(2    ,						isqrt(lowerCAmelCase ) + 1 ) )


def 					_a							(					lowerCAmelCase = 10**6 )->	int:
		SCREAMING_SNAKE_CASE_					      =							0
		SCREAMING_SNAKE_CASE_					      =							1
		SCREAMING_SNAKE_CASE_					      =							7
		while prime_candidate < max_prime:
				primes_count += is_prime(lowerCAmelCase )

				cube_index += 1
				prime_candidate += 6 * cube_index

		return primes_count


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