
import inspect
import json
import os
import tempfile
import unittest

from transformers.models.speech_to_text_a import SpeechaTextaTokenizer
from transformers.models.speech_to_text_a.tokenization_speech_to_text_a import VOCAB_FILES_NAMES

from ...test_tokenization_common import TokenizerTesterMixin


class 						__magic_name__				(  snake_case,			unittest.TestCase      ):
		_lowerCAmelCase						=		SpeechaTextaTokenizer
		_lowerCAmelCase						=		False





		def  _A							(							self      :		List[Any]			):
							super().setUp()

							lowerCAmelCase						:   Dict							=       '''<s> <pad> </s> <unk> here@@ a couple of@@ words for the he@@ re@@ vocab'''.split(''' '''			)
							lowerCAmelCase						:   Any							=       ['''he re</w> 123''', '''here a 1456''']
							lowerCAmelCase						:   Optional[int]							=       dict(zip(lowerCamelCase__  ,					range(len(lowerCamelCase__			)			)			)			)

							lowerCAmelCase						:   str							=       {'''pad_token''': '''<pad>''', '''unk_token''': '''<unk>''', '''bos_token''': '''<s>''', '''eos_token''': '''</s>'''}

							lowerCAmelCase						:   Any							=       tempfile.mkdtemp()
							lowerCAmelCase						:   Dict							=       os.path.join(self.tmpdirname  ,					VOCAB_FILES_NAMES['''vocab_file''']			)
							lowerCAmelCase						:   Optional[Any]							=       os.path.join(self.tmpdirname  ,					VOCAB_FILES_NAMES['''merges_file''']			)

							with open(self.vocab_file  ,					'''w'''  ,					encoding='''utf-8'''			) as fp:
												fp.write(json.dumps(lowerCamelCase__			) + '''\n'''			)

							with open(self.merges_file  ,					'''w'''			) as fp:
												fp.write('''\n'''.join(lowerCamelCase__			)			)





		def  _A							(							self      :		Any			):
							lowerCAmelCase						:   Union[str, Any]							=       list(self.get_tokenizer().get_vocab().keys()			)

							self.assertEqual(vocab_keys[0]  ,					'''<s>'''			)
							self.assertEqual(vocab_keys[1]  ,					'''<pad>'''			)
							self.assertEqual(vocab_keys[-1]  ,					'''vocab'''			)
							self.assertEqual(len(lowerCamelCase__			)  ,					1_4			)





		def  _A							(							self      :		Any			):
							self.assertEqual(self.get_tokenizer().vocab_size  ,					1_4			)





		def  _A							(							self      :		Dict			):
							lowerCAmelCase						:   Tuple							=       SpeechaTextaTokenizer.from_pretrained(self.tmpdirname			)

							# make sure @@ is correctly concatenated
							lowerCAmelCase						:   Union[str, Any]							=       [4, 6, 8, 7, 1_0]  # ["here@@", "couple", "words", "of@@", "the"]
							lowerCAmelCase						:   int							=       tokenizer.decode(lowerCamelCase__			)

							self.assertTrue(output_string == '''herecouple words ofthe'''			)





		def  _A							(							self      :		List[str]			):
							lowerCAmelCase						:   Optional[Any]							=       SpeechaTextaTokenizer.from_pretrained(self.tmpdirname			)

							with tempfile.TemporaryDirectory() as tmp_dirname:
												tokenizer.save_pretrained(lowerCamelCase__			)
												os.remove(os.path.join(lowerCamelCase__  ,					'''merges.txt'''			)			)

												# load tokenizer without merges file should not throw an error
												lowerCAmelCase						:   List[Any]							=       SpeechaTextaTokenizer.from_pretrained(lowerCamelCase__			)

							with tempfile.TemporaryDirectory() as tmp_dirname:
												# save tokenizer and load again
												tokenizer.save_pretrained(lowerCamelCase__			)
												lowerCAmelCase						:   Optional[int]							=       SpeechaTextaTokenizer.from_pretrained(lowerCamelCase__			)

							self.assertIsNotNone(lowerCamelCase__			)





		def  _A							(							self      :		List[str]			):
							if not self.test_slow_tokenizer:
												return

							lowerCAmelCase						:   str							=       inspect.signature(self.tokenizer_class.__init__			)
							lowerCAmelCase						:   Tuple							=       self.get_tokenizer()

							for parameter_name, parameter in signature.parameters.items():
												if parameter.default != inspect.Parameter.empty and parameter_name != "merges_file":
																	self.assertIn(lowerCamelCase__  ,					tokenizer.init_kwargs			)


from math import floor, sqrt
def       UpperCAmelCase__							(    __magic_name__  :       int					):


					'''simple docstring'''

					lowerCAmelCase						:   int							=       0.0
					lowerCAmelCase						:   int							=       1.0
					lowerCAmelCase						:   Any							=       int(sqrt(__magic_name__					)					)
					lowerCAmelCase						:   Optional[int]							=       root
					lowerCAmelCase						:   Dict							=       0
					while integer_part != 2 * root:
										lowerCAmelCase						:   str							=       denominator * integer_part - numerator
										lowerCAmelCase						:   Dict							=       (n - numerator**2) / denominator
										lowerCAmelCase						:   str							=       int((root + numerator) / denominator					)
										period += 1
					return period
def       UpperCAmelCase__							(    __magic_name__  :       int = 1_00_00					):


					'''simple docstring'''

					lowerCAmelCase						:   List[str]							=       0
					for i in range(2							,					n + 1					):
										lowerCAmelCase						:   Any							=       sqrt(__magic_name__					)
										if sr - floor(__magic_name__					) != 0 and continuous_fraction_period(__magic_name__					) % 2 == 1:
															count_odd_periods += 1
					return count_odd_periods


if __name__ == "__main__":
		print(f"""{solution(int(input().strip()))}""")
