





"""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"""






import unittest
from pathlib import Path
from tempfile import TemporaryDirectory

from transformers import AutoConfig, TFAutoModel, is_tensorflow_text_available, is_tf_available
from transformers.models.bert.tokenization_bert import BertTokenizer
from transformers.testing_utils import require_tensorflow_text, require_tf, slow


if is_tf_available():
		import tensorflow as tf

if is_tensorflow_text_available():
		from transformers.models.bert import TFBertTokenizer


A 			=  ['''bert-base-uncased''', '''bert-base-cased''']
A 			=  '''hf-internal-testing/tiny-bert-tf-only'''

if is_tf_available():




		class 				__lowercase			(			tf.keras.Model							):







							'''simple docstring'''




							def __init__(						self	,			_UpperCAmelCase     ):
											super().__init__()
											__a :						Any			       =  tokenizer
											__a :						Optional[Any]			       =  AutoConfig.from_pretrained(_UpperCAmelCase     )
											__a :						str			       =  TFAutoModel.from_config(_UpperCAmelCase     )







							def  _lowerCamelCase		(						self	,			_UpperCAmelCase     ):
											__a :						Any			       =  self.tokenizer(_UpperCAmelCase     )
											__a :						int			       =  self.bert(**_UpperCAmelCase     )
											return out["pooler_output"]




@require_tf
@require_tensorflow_text
class 				__lowercase			(			unittest.TestCase							):







					'''simple docstring'''




					def  _lowerCamelCase		(						self     ):
									super().setUp()

									__a :						Any			       =  [
									    BertTokenizer.from_pretrained(_UpperCAmelCase     ) for checkpoint in (TOKENIZER_CHECKPOINTS * 2)
									]  # repeat for when fast_bert_tokenizer=false
									__a :						Union[str, Any]			       =  [TFBertTokenizer.from_pretrained(_UpperCAmelCase     ) for checkpoint in TOKENIZER_CHECKPOINTS] + [
									    TFBertTokenizer.from_pretrained(_UpperCAmelCase	,			use_fast_bert_tokenizer=_UpperCAmelCase     )
									    for checkpoint in TOKENIZER_CHECKPOINTS
									]
									assert len(self.tokenizers     ) == len(self.tf_tokenizers     )

									__a :						Tuple			       =  [
									    '''This is a straightforward English test sentence.''',
									    '''This one has some weird characters\rto\nsee\r\nif  those\u00E9break things.''',
									    '''Now we\'re going to add some Chinese: 一 二 三 一二三''',
									    '''And some much more rare Chinese: 齉 堃 齉堃''',
									    '''Je vais aussi écrire en français pour tester les accents''',
									    '''Classical Irish also has some unusual characters, so in they go: Gaelaċ, ꝼ''',
									]
									__a :						Any			       =  list(zip(self.test_sentences	,			self.test_sentences[::-1]     )     )







					def  _lowerCamelCase		(						self     ):
									for tokenizer, tf_tokenizer in zip(self.tokenizers	,			self.tf_tokenizers     ):
													for test_inputs in (self.test_sentences, self.paired_sentences):
																	__a :						List[Any]			       =  tokenizer(_UpperCAmelCase	,			return_tensors='''tf'''	,			padding='''longest'''     )
																	__a :						List[str]			       =  tf_tokenizer(_UpperCAmelCase     )

																	for key in python_outputs.keys():
																					self.assertTrue(tf.reduce_all(python_outputs[key].shape == tf_outputs[key].shape     )     )
																					self.assertTrue(tf.reduce_all(tf.cast(python_outputs[key]	,			tf.intaa     ) == tf_outputs[key]     )     )







					@slow
					def  _lowerCamelCase		(						self     ):
									for tf_tokenizer in self.tf_tokenizers:
													__a :						Dict			       =  tf_tokenizer(self.paired_sentences     )
													__a :						str			       =  tf_tokenizer(
													    text=[sentence[0] for sentence in self.paired_sentences]	,			text_pair=[sentence[1] for sentence in self.paired_sentences]	,			)
													for key in merged_outputs.keys():
																	self.assertTrue(tf.reduce_all(tf.cast(merged_outputs[key]	,			tf.intaa     ) == separated_outputs[key]     )     )







					@slow
					def  _lowerCamelCase		(						self     ):
									for tf_tokenizer in self.tf_tokenizers:
													__a :						Tuple			       =  tf.function(_UpperCAmelCase     )
													for test_inputs in (self.test_sentences, self.paired_sentences):
																	__a :						List[str]			       =  tf.constant(_UpperCAmelCase     )
																	__a :						Tuple			       =  compiled_tokenizer(_UpperCAmelCase     )
																	__a :						Union[str, Any]			       =  tf_tokenizer(_UpperCAmelCase     )

																	for key in eager_outputs.keys():
																					self.assertTrue(tf.reduce_all(eager_outputs[key] == compiled_outputs[key]     )     )







					@slow
					def  _lowerCamelCase		(						self     ):
									for tf_tokenizer in self.tf_tokenizers:
													__a :						Dict			       =  ModelToSave(tokenizer=_UpperCAmelCase     )
													__a :						Tuple			       =  tf.convert_to_tensor(self.test_sentences     )
													__a :						List[str]			       =  model(_UpperCAmelCase     )  # Build model with some sample inputs
													with TemporaryDirectory() as tempdir:
																	__a :						Tuple			       =  Path(_UpperCAmelCase     ) / '''saved.model'''
																	model.save(_UpperCAmelCase     )
																	__a :						Tuple			       =  tf.keras.models.load_model(_UpperCAmelCase     )
													__a :						int			       =  loaded_model(_UpperCAmelCase     )
													# We may see small differences because the loaded model is compiled, so we need an epsilon for the test
													self.assertLessEqual(tf.reduce_max(tf.abs(out - loaded_output     )     )	,			1e-5     )