






import json
import sys
import tempfile
import unittest
from pathlib import Path

import transformers
from transformers import (
    CONFIG_MAPPING,
    FEATURE_EXTRACTOR_MAPPING,
    AutoConfig,
    AutoFeatureExtractor,
    WavaVecaConfig,
    WavaVecaFeatureExtractor,
)
from transformers.testing_utils import DUMMY_UNKNOWN_IDENTIFIER, get_tests_dir


sys.path.append(str(Path(__file__).parent.parent.parent.parent / 'utils'))

from test_module.custom_configuration import CustomConfig  # noqa E402
from test_module.custom_feature_extraction import CustomFeatureExtractor  # noqa E402


A        =			get_tests_dir('fixtures')
A        =			get_tests_dir('fixtures/dummy_feature_extractor_config.json')
A        =			get_tests_dir('fixtures/dummy-config.json')


class 							__a							(  unittest.TestCase						):





		'''simple docstring'''



		def   __snake_case			(						self       ):
						SCREAMING_SNAKE_CASE_   :	Dict													=   0


		def   __snake_case			(						self       ):
						SCREAMING_SNAKE_CASE_   :	List[Any]													=   AutoFeatureExtractor.from_pretrained('facebook/wav2vec2-base-960h'       )
						self.assertIsInstance(UpperCamelCase__ ,    UpperCamelCase__       )


		def   __snake_case			(						self       ):
						SCREAMING_SNAKE_CASE_   :	Any													=   AutoFeatureExtractor.from_pretrained(UpperCamelCase__       )
						self.assertIsInstance(UpperCamelCase__ ,    UpperCamelCase__       )


		def   __snake_case			(						self       ):
						with tempfile.TemporaryDirectory() as tmpdirname:
										SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   WavaVecaConfig()

										# remove feature_extractor_type to make sure config.json alone is enough to load feature processor locally
										SCREAMING_SNAKE_CASE_   :	Optional[int]													=   AutoFeatureExtractor.from_pretrained(UpperCamelCase__       ).to_dict()

										config_dict.pop('feature_extractor_type'       )
										SCREAMING_SNAKE_CASE_   :	List[Any]													=   WavaVecaFeatureExtractor(**UpperCamelCase__       )

										# save in new folder
										model_config.save_pretrained(UpperCamelCase__       )
										config.save_pretrained(UpperCamelCase__       )

										SCREAMING_SNAKE_CASE_   :	List[Any]													=   AutoFeatureExtractor.from_pretrained(UpperCamelCase__       )

										# make sure private variable is not incorrectly saved
										SCREAMING_SNAKE_CASE_   :	int													=   json.loads(config.to_json_string()       )
										self.assertTrue('_processor_class' not in dict_as_saved       )

						self.assertIsInstance(UpperCamelCase__ ,    UpperCamelCase__       )


		def   __snake_case			(						self       ):
						SCREAMING_SNAKE_CASE_   :	Tuple													=   AutoFeatureExtractor.from_pretrained(UpperCamelCase__       )
						self.assertIsInstance(UpperCamelCase__ ,    UpperCamelCase__       )


		def   __snake_case			(						self       ):
						with self.assertRaisesRegex(
						    UpperCamelCase__ ,    'bert-base is not a local folder and is not a valid model identifier'       ):
										SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   AutoFeatureExtractor.from_pretrained('bert-base'       )


		def   __snake_case			(						self       ):
						with self.assertRaisesRegex(
						    UpperCamelCase__ ,    R'aaaaaa is not a valid git identifier \(branch name, tag name or commit id\)'       ):
										SCREAMING_SNAKE_CASE_   :	List[Any]													=   AutoFeatureExtractor.from_pretrained(UpperCamelCase__ ,    revision='aaaaaa'       )


		def   __snake_case			(						self       ):
						with self.assertRaisesRegex(
						    UpperCamelCase__ ,    'hf-internal-testing/config-no-model does not appear to have a file named preprocessor_config.json.' ,    ):
										SCREAMING_SNAKE_CASE_   :	List[str]													=   AutoFeatureExtractor.from_pretrained('hf-internal-testing/config-no-model'       )


		def   __snake_case			(						self       ):
						# If remote code is not set, we will time out when asking whether to load the model.
						with self.assertRaises(UpperCamelCase__       ):
										SCREAMING_SNAKE_CASE_   :	int													=   AutoFeatureExtractor.from_pretrained(
										    'hf-internal-testing/test_dynamic_feature_extractor'       )
						# If remote code is disabled, we can't load this config.
						with self.assertRaises(UpperCamelCase__       ):
										SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   AutoFeatureExtractor.from_pretrained(
										    'hf-internal-testing/test_dynamic_feature_extractor' ,    trust_remote_code=UpperCamelCase__       )

						SCREAMING_SNAKE_CASE_   :	Optional[int]													=   AutoFeatureExtractor.from_pretrained(
						    'hf-internal-testing/test_dynamic_feature_extractor' ,    trust_remote_code=UpperCamelCase__       )
						self.assertEqual(feature_extractor.__class__.__name__ ,    'NewFeatureExtractor'       )

						# Test feature extractor can be reloaded.
						with tempfile.TemporaryDirectory() as tmp_dir:
										feature_extractor.save_pretrained(UpperCamelCase__       )
										SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   AutoFeatureExtractor.from_pretrained(UpperCamelCase__ ,    trust_remote_code=UpperCamelCase__       )
						self.assertEqual(reloaded_feature_extractor.__class__.__name__ ,    'NewFeatureExtractor'       )


		def   __snake_case			(						self       ):
						try:
										AutoConfig.register('custom' ,    UpperCamelCase__       )
										AutoFeatureExtractor.register(UpperCamelCase__ ,    UpperCamelCase__       )
										# Trying to register something existing in the Transformers library will raise an error
										with self.assertRaises(UpperCamelCase__       ):
														AutoFeatureExtractor.register(UpperCamelCase__ ,    UpperCamelCase__       )

										# Now that the config is registered, it can be used as any other config with the auto-API
										SCREAMING_SNAKE_CASE_   :	int													=   CustomFeatureExtractor.from_pretrained(UpperCamelCase__       )
										with tempfile.TemporaryDirectory() as tmp_dir:
														feature_extractor.save_pretrained(UpperCamelCase__       )
														SCREAMING_SNAKE_CASE_   :	Optional[int]													=   AutoFeatureExtractor.from_pretrained(UpperCamelCase__       )
														self.assertIsInstance(UpperCamelCase__ ,    UpperCamelCase__       )

						finally:
										if "custom" in CONFIG_MAPPING._extra_content:
														del CONFIG_MAPPING._extra_content["custom"]
										if CustomConfig in FEATURE_EXTRACTOR_MAPPING._extra_content:
														del FEATURE_EXTRACTOR_MAPPING._extra_content[CustomConfig]






		def   __snake_case			(						self       ):


						class 							__a							(  __A						):





								'''simple docstring'''



								UpperCAmelCase__      :				int				    =						True

						try:
										AutoConfig.register('custom' ,    UpperCamelCase__       )
										AutoFeatureExtractor.register(UpperCamelCase__ ,    UpperCamelCase__       )
										# If remote code is not set, the default is to use local
										SCREAMING_SNAKE_CASE_   :	Dict													=   AutoFeatureExtractor.from_pretrained(
										    'hf-internal-testing/test_dynamic_feature_extractor'       )
										self.assertEqual(feature_extractor.__class__.__name__ ,    'NewFeatureExtractor'       )
										self.assertTrue(feature_extractor.is_local       )

										# If remote code is disabled, we load the local one.
										SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   AutoFeatureExtractor.from_pretrained(
										    'hf-internal-testing/test_dynamic_feature_extractor' ,    trust_remote_code=UpperCamelCase__       )
										self.assertEqual(feature_extractor.__class__.__name__ ,    'NewFeatureExtractor'       )
										self.assertTrue(feature_extractor.is_local       )

										# If remote is enabled, we load from the Hub
										SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   AutoFeatureExtractor.from_pretrained(
										    'hf-internal-testing/test_dynamic_feature_extractor' ,    trust_remote_code=UpperCamelCase__       )
										self.assertEqual(feature_extractor.__class__.__name__ ,    'NewFeatureExtractor'       )
										self.assertTrue(not hasattr(UpperCamelCase__ ,    'is_local'       )       )

						finally:
										if "custom" in CONFIG_MAPPING._extra_content:
														del CONFIG_MAPPING._extra_content["custom"]
										if CustomConfig in FEATURE_EXTRACTOR_MAPPING._extra_content:
														del FEATURE_EXTRACTOR_MAPPING._extra_content[CustomConfig]







def 					_lowerCamelCase(			):





				'''simple docstring'''







				return 1



def 					_lowerCamelCase(			lowerCAmelCase__				:		int      ):





				'''simple docstring'''







				return 0 if x < 0 else two_pence(x - 2      ) + one_pence()



def 					_lowerCamelCase(			lowerCAmelCase__				:		int      ):





				'''simple docstring'''







				return 0 if x < 0 else five_pence(x - 5      ) + two_pence(lowerCAmelCase__      )



def 					_lowerCamelCase(			lowerCAmelCase__				:		int      ):





				'''simple docstring'''







				return 0 if x < 0 else ten_pence(x - 10      ) + five_pence(lowerCAmelCase__      )



def 					_lowerCamelCase(			lowerCAmelCase__				:		int      ):





				'''simple docstring'''







				return 0 if x < 0 else twenty_pence(x - 20      ) + ten_pence(lowerCAmelCase__      )



def 					_lowerCamelCase(			lowerCAmelCase__				:		int      ):





				'''simple docstring'''







				return 0 if x < 0 else fifty_pence(x - 50      ) + twenty_pence(lowerCAmelCase__      )



def 					_lowerCamelCase(			lowerCAmelCase__				:		int      ):





				'''simple docstring'''







				return 0 if x < 0 else one_pound(x - 100      ) + fifty_pence(lowerCAmelCase__      )



def 					_lowerCamelCase(			lowerCAmelCase__				:		int      ):





				'''simple docstring'''







				return 0 if x < 0 else two_pound(x - 200      ) + one_pound(lowerCAmelCase__      )



def 					_lowerCamelCase(			lowerCAmelCase__				:		int = 200      ):





				'''simple docstring'''







				return two_pound(lowerCAmelCase__      )


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