


'''simple docstring'''






import gc
import tempfile
import unittest

import numpy as np
import torch

from diffusers import VersatileDiffusionPipeline
from diffusers.utils.testing_utils import load_image, nightly, require_torch_gpu, torch_device


lowercase				=False






class    __magic_name__				(						unittest.TestCase							):
       pass






@nightly
@require_torch_gpu
class    __magic_name__				(						unittest.TestCase							):






       def      lowerCAmelCase						(     self)		->    Any:




          '''simple docstring'''
          super().tearDown()
          gc.collect()
          torch.cuda.empty_cache()






       def      lowerCAmelCase						(     self)		->    int:




          '''simple docstring'''
          _UpperCAmelCase  :  Any				       =VersatileDiffusionPipeline.from_pretrained('shi-labs/versatile-diffusion'    ,				torch_dtype=torch.floataa)
          pipe.to(a_)
          pipe.set_progress_bar_config(disable=a_)

          _UpperCAmelCase  :  Dict				       =load_image(
              'https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/versatile_diffusion/benz.jpg')

          _UpperCAmelCase  :  str				       =torch.manual_seed(0)
          _UpperCAmelCase  :  List[str]				       =pipe.dual_guided(
              prompt='first prompt'    ,				image=a_    ,				text_to_image_strength=0.75    ,				generator=a_    ,				guidance_scale=7.5    ,				num_inference_steps=2    ,				output_type='numpy'    ,				).images

          with tempfile.TemporaryDirectory() as tmpdirname:
             pipe.save_pretrained(a_)
             _UpperCAmelCase  :  Optional[int]				       =VersatileDiffusionPipeline.from_pretrained(a_    ,				torch_dtype=torch.floataa)
          pipe.to(a_)
          pipe.set_progress_bar_config(disable=a_)

          _UpperCAmelCase  :  Optional[int]				       =generator.manual_seed(0)
          _UpperCAmelCase  :  Optional[int]				       =pipe.dual_guided(
              prompt='first prompt'    ,				image=a_    ,				text_to_image_strength=0.75    ,				generator=a_    ,				guidance_scale=7.5    ,				num_inference_steps=2    ,				output_type='numpy'    ,				).images

          assert np.abs(image - new_image).sum() < 1E-5, "Models don't have the same forward pass"






       def      lowerCAmelCase						(     self)		->    Optional[int]:




          '''simple docstring'''
          _UpperCAmelCase  :  Union[str, Any]				       =VersatileDiffusionPipeline.from_pretrained('shi-labs/versatile-diffusion'    ,				torch_dtype=torch.floataa)
          pipe.to(a_)
          pipe.set_progress_bar_config(disable=a_)

          _UpperCAmelCase  :  Dict				       ='cyberpunk 2077'
          _UpperCAmelCase  :  Tuple				       =load_image(
              'https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/versatile_diffusion/benz.jpg')
          _UpperCAmelCase  :  str				       =torch.manual_seed(0)
          _UpperCAmelCase  :  Optional[int]				       =pipe.dual_guided(
              prompt=a_    ,				image=a_    ,				text_to_image_strength=0.75    ,				generator=a_    ,				guidance_scale=7.5    ,				num_inference_steps=5_0    ,				output_type='numpy'    ,				).images

          _UpperCAmelCase  :  Union[str, Any]				       =image[0, 2_5_3:2_5_6, 2_5_3:2_5_6, -1]

          assert image.shape == (1, 5_1_2, 5_1_2, 3)
          _UpperCAmelCase  :  int				       =np.array([0.14_48, 0.16_19, 0.17_41, 0.10_86, 0.11_47, 0.11_28, 0.11_99, 0.11_65, 0.10_01])

          assert np.abs(image_slice.flatten() - expected_slice).max() < 1E-1

          _UpperCAmelCase  :  List[Any]				       ='A painting of a squirrel eating a burger '
          _UpperCAmelCase  :  List[Any]				       =torch.manual_seed(0)
          _UpperCAmelCase  :  Tuple				       =pipe.text_to_image(
              prompt=a_    ,				generator=a_    ,				guidance_scale=7.5    ,				num_inference_steps=5_0    ,				output_type='numpy').images

          _UpperCAmelCase  :  str				       =image[0, 2_5_3:2_5_6, 2_5_3:2_5_6, -1]

          assert image.shape == (1, 5_1_2, 5_1_2, 3)
          _UpperCAmelCase  :  int				       =np.array([0.33_67, 0.31_69, 0.26_56, 0.38_70, 0.47_90, 0.37_96, 0.40_09, 0.48_78, 0.47_78])

          assert np.abs(image_slice.flatten() - expected_slice).max() < 1E-1

          _UpperCAmelCase  :  Tuple				       =pipe.image_variation(a_    ,				generator=a_    ,				output_type='numpy').images

          _UpperCAmelCase  :  int				       =image[0, 2_5_3:2_5_6, 2_5_3:2_5_6, -1]

          assert image.shape == (1, 5_1_2, 5_1_2, 3)
          _UpperCAmelCase  :  Union[str, Any]				       =np.array([0.30_76, 0.31_23, 0.32_84, 0.37_82, 0.37_70, 0.38_94, 0.42_97, 0.43_31, 0.44_56])

          assert np.abs(image_slice.flatten() - expected_slice).max() < 1E-1






def     UpperCAmelCase_		(					)	->     int:



				"""simple docstring"""





				return 1







def     UpperCAmelCase_		(					snake_case__					)	->     int:



				"""simple docstring"""





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







def     UpperCAmelCase_		(					snake_case__					)	->     int:



				"""simple docstring"""





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







def     UpperCAmelCase_		(					snake_case__					)	->     int:



				"""simple docstring"""





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







def     UpperCAmelCase_		(					snake_case__					)	->     int:



				"""simple docstring"""





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







def     UpperCAmelCase_		(					snake_case__					)	->     int:



				"""simple docstring"""





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







def     UpperCAmelCase_		(					snake_case__					)	->     int:



				"""simple docstring"""





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







def     UpperCAmelCase_		(					snake_case__					)	->     int:



				"""simple docstring"""





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







def     UpperCAmelCase_		(					snake_case__ = 200					)	->     int:



				"""simple docstring"""





				return two_pound(snake_case__					)


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