






from typing import Dict, List, Optional, Union

import numpy as np

from transformers.utils import is_vision_available
from transformers.utils.generic import TensorType

from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
from ...image_transforms import (
    center_crop,
    get_resize_output_image_size,
    normalize,
    rescale,
    resize,
    to_channel_dimension_format,
)
from ...image_utils import (
    IMAGENET_STANDARD_MEAN,
    IMAGENET_STANDARD_STD,
    ChannelDimension,
    ImageInput,
    PILImageResampling,
    is_valid_image,
    to_numpy_array,
    valid_images,
)
from ...utils import logging


if is_vision_available():
				import PIL

A        =			logging.get_logger(__name__)



def 					_lowerCamelCase(			lowerCAmelCase__				:		Tuple      ):





				'''simple docstring'''







				if isinstance(lowerCAmelCase__    ,    (list, tuple)      ) and isinstance(videos[0]    ,    (list, tuple)      ) and is_valid_image(videos[0][0]      ):
								return videos

				elif isinstance(lowerCAmelCase__    ,    (list, tuple)      ) and is_valid_image(videos[0]      ):
								return [videos]

				elif is_valid_image(lowerCAmelCase__      ):
								return [[videos]]

				raise ValueError(F'''Could not make batched video from {videos}'''      )


class 							__a							(  __A						):





		'''simple docstring'''



		UpperCAmelCase__      :				int				    =						["""pixel_values"""]


		def __init__(						self ,    UpperCamelCase__ = True ,    UpperCamelCase__ = None ,    UpperCamelCase__ = PILImageResampling.BILINEAR ,    UpperCamelCase__ = True ,    UpperCamelCase__ = None ,    UpperCamelCase__ = True ,    UpperCamelCase__ = 1 / 255 ,    UpperCamelCase__ = True ,    UpperCamelCase__ = True ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    **UpperCamelCase__ ,    ):
						super().__init__(**UpperCamelCase__       )
						SCREAMING_SNAKE_CASE_   :	Tuple													=   size if size is not None else {'shortest_edge': 256}
						SCREAMING_SNAKE_CASE_   :	Tuple													=   get_size_dict(UpperCamelCase__ ,    default_to_square=UpperCamelCase__       )
						SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   crop_size if crop_size is not None else {'height': 224, 'width': 224}
						SCREAMING_SNAKE_CASE_   :	Dict													=   get_size_dict(UpperCamelCase__ ,    param_name='crop_size'       )

						SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   do_resize
						SCREAMING_SNAKE_CASE_   :	List[Any]													=   size
						SCREAMING_SNAKE_CASE_   :	str													=   do_center_crop
						SCREAMING_SNAKE_CASE_   :	Tuple													=   crop_size
						SCREAMING_SNAKE_CASE_   :	List[str]													=   resample
						SCREAMING_SNAKE_CASE_   :	List[Any]													=   do_rescale
						SCREAMING_SNAKE_CASE_   :	Tuple													=   rescale_factor
						SCREAMING_SNAKE_CASE_   :	List[Any]													=   offset
						SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   do_normalize
						SCREAMING_SNAKE_CASE_   :	Any													=   image_mean if image_mean is not None else IMAGENET_STANDARD_MEAN
						SCREAMING_SNAKE_CASE_   :	Dict													=   image_std if image_std is not None else IMAGENET_STANDARD_STD


		def   __snake_case			(						self ,    UpperCamelCase__ ,    UpperCamelCase__ ,    UpperCamelCase__ = PILImageResampling.BILINEAR ,    UpperCamelCase__ = None ,    **UpperCamelCase__ ,    ):
						SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   get_size_dict(UpperCamelCase__ ,    default_to_square=UpperCamelCase__       )
						if "shortest_edge" in size:
										SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   get_resize_output_image_size(UpperCamelCase__ ,    size['shortest_edge'] ,    default_to_square=UpperCamelCase__       )
						elif "height" in size and "width" in size:
										SCREAMING_SNAKE_CASE_   :	Dict													=   (size['height'], size['width'])
						else:
										raise ValueError(F'''Size must have \'height\' and \'width\' or \'shortest_edge\' as keys. Got {size.keys()}'''       )
						return resize(UpperCamelCase__ ,    size=UpperCamelCase__ ,    resample=UpperCamelCase__ ,    data_format=UpperCamelCase__ ,    **UpperCamelCase__       )


		def   __snake_case			(						self ,    UpperCamelCase__ ,    UpperCamelCase__ ,    UpperCamelCase__ = None ,    **UpperCamelCase__ ,    ):
						SCREAMING_SNAKE_CASE_   :	int													=   get_size_dict(UpperCamelCase__       )
						if "height" not in size or "width" not in size:
										raise ValueError(F'''Size must have \'height\' and \'width\' as keys. Got {size.keys()}'''       )
						return center_crop(UpperCamelCase__ ,    size=(size['height'], size['width']) ,    data_format=UpperCamelCase__ ,    **UpperCamelCase__       )


		def   __snake_case			(						self ,    UpperCamelCase__ ,    UpperCamelCase__ ,    UpperCamelCase__ = True ,    UpperCamelCase__ = None ,    **UpperCamelCase__ ,    ):
						SCREAMING_SNAKE_CASE_   :	Optional[int]													=   image.astype(np.floataa       )
						if offset:
										SCREAMING_SNAKE_CASE_   :	Optional[Any]													=   image - (scale / 2)
						return rescale(UpperCamelCase__ ,    scale=UpperCamelCase__ ,    data_format=UpperCamelCase__ ,    **UpperCamelCase__       )


		def   __snake_case			(						self ,    UpperCamelCase__ ,    UpperCamelCase__ ,    UpperCamelCase__ ,    UpperCamelCase__ = None ,    **UpperCamelCase__ ,    ):
						return normalize(UpperCamelCase__ ,    mean=UpperCamelCase__ ,    std=UpperCamelCase__ ,    data_format=UpperCamelCase__ ,    **UpperCamelCase__       )


		def   __snake_case			(						self ,    UpperCamelCase__ ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = ChannelDimension.FIRST ,    ):
						if do_resize and size is None or resample is None:
										raise ValueError('Size and resample must be specified if do_resize is True.'       )

						if do_center_crop and crop_size is None:
										raise ValueError('Crop size must be specified if do_center_crop is True.'       )

						if do_rescale and rescale_factor is None:
										raise ValueError('Rescale factor must be specified if do_rescale is True.'       )

						if do_normalize and (image_mean is None or image_std is None):
										raise ValueError('Image mean and std must be specified if do_normalize is True.'       )

						if offset and not do_rescale:
										raise ValueError('For offset, do_rescale must also be set to True.'       )

						# All transformations expect numpy arrays.
						SCREAMING_SNAKE_CASE_   :	List[str]													=   to_numpy_array(UpperCamelCase__       )

						if do_resize:
										SCREAMING_SNAKE_CASE_   :	Tuple													=   self.resize(image=UpperCamelCase__ ,    size=UpperCamelCase__ ,    resample=UpperCamelCase__       )

						if do_center_crop:
										SCREAMING_SNAKE_CASE_   :	Dict													=   self.center_crop(UpperCamelCase__ ,    size=UpperCamelCase__       )

						if do_rescale:
										SCREAMING_SNAKE_CASE_   :	Optional[int]													=   self.rescale(image=UpperCamelCase__ ,    scale=UpperCamelCase__ ,    offset=UpperCamelCase__       )

						if do_normalize:
										SCREAMING_SNAKE_CASE_   :	Dict													=   self.normalize(image=UpperCamelCase__ ,    mean=UpperCamelCase__ ,    std=UpperCamelCase__       )

						SCREAMING_SNAKE_CASE_   :	List[str]													=   to_channel_dimension_format(UpperCamelCase__ ,    UpperCamelCase__       )
						return image






		def   __snake_case			(						self ,    UpperCamelCase__ ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = None ,    UpperCamelCase__ = ChannelDimension.FIRST ,    **UpperCamelCase__ ,    ):
						SCREAMING_SNAKE_CASE_   :	Any													=   do_resize if do_resize is not None else self.do_resize
						SCREAMING_SNAKE_CASE_   :	Tuple													=   resample if resample is not None else self.resample
						SCREAMING_SNAKE_CASE_   :	Any													=   do_center_crop if do_center_crop is not None else self.do_center_crop
						SCREAMING_SNAKE_CASE_   :	List[Any]													=   do_rescale if do_rescale is not None else self.do_rescale
						SCREAMING_SNAKE_CASE_   :	Any													=   rescale_factor if rescale_factor is not None else self.rescale_factor
						SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   offset if offset is not None else self.offset
						SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   do_normalize if do_normalize is not None else self.do_normalize
						SCREAMING_SNAKE_CASE_   :	List[Any]													=   image_mean if image_mean is not None else self.image_mean
						SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   image_std if image_std is not None else self.image_std

						SCREAMING_SNAKE_CASE_   :	Optional[int]													=   size if size is not None else self.size
						SCREAMING_SNAKE_CASE_   :	Any													=   get_size_dict(UpperCamelCase__ ,    default_to_square=UpperCamelCase__       )
						SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   crop_size if crop_size is not None else self.crop_size
						SCREAMING_SNAKE_CASE_   :	Union[str, Any]													=   get_size_dict(UpperCamelCase__ ,    param_name='crop_size'       )

						if not valid_images(UpperCamelCase__       ):
										raise ValueError(
										    'Invalid image type. Must be of type PIL.Image.Image, numpy.ndarray, '
										    'torch.Tensor, tf.Tensor or jax.ndarray.'       )

						SCREAMING_SNAKE_CASE_   :	List[str]													=   make_batched(UpperCamelCase__       )

						SCREAMING_SNAKE_CASE_   :	Tuple													=   [
						    [
						        self._preprocess_image(
						            image=UpperCamelCase__ ,    do_resize=UpperCamelCase__ ,    size=UpperCamelCase__ ,    resample=UpperCamelCase__ ,    do_center_crop=UpperCamelCase__ ,    crop_size=UpperCamelCase__ ,    do_rescale=UpperCamelCase__ ,    rescale_factor=UpperCamelCase__ ,    offset=UpperCamelCase__ ,    do_normalize=UpperCamelCase__ ,    image_mean=UpperCamelCase__ ,    image_std=UpperCamelCase__ ,    data_format=UpperCamelCase__ ,    )
						        for img in video
						    ]
						    for video in videos
						]

						SCREAMING_SNAKE_CASE_   :	List[Any]													=   {'pixel_values': videos}
						return BatchFeature(data=UpperCamelCase__ ,    tensor_type=UpperCamelCase__       )







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