


from typing import Dict, List, Optional, Union

import numpy as np

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_DEFAULT_MEAN,
    IMAGENET_DEFAULT_STD,
    ChannelDimension,
    ImageInput,
    PILImageResampling,
    make_list_of_images,
    to_numpy_array,
    valid_images,
)
from ...utils import TensorType, is_vision_available, logging


if is_vision_available():
    import PIL


__snake_case   							=						logging.get_logger(__name__)



class 	__lowerCamelCase			(_a						):
       _lowercase											=     ["""pixel_values"""]







       def __init__(			self: List[str],A_: bool = True,A_: Dict[str, int] = None,A_: int = 0.9,A_: PILImageResampling = PILImageResampling.BICUBIC,A_: bool = True,A_: Dict[str, int] = None,A_: Union[int, float] = 1 / 255,A_: bool = True,A_: bool = True,A_: Optional[Union[float, List[float]]] = None,A_: Optional[Union[float, List[float]]] = None,**A_: int,):






            '''simple docstring'''




            super().__init__(**A_					)
            __UpperCamelCase =			size if size is not None else {'shortest_edge': 224}
            __UpperCamelCase =			get_size_dict(A_,default_to_square=A_					)
            __UpperCamelCase =			crop_size if crop_size is not None else {'height': 224, 'width': 224}
            __UpperCamelCase =			get_size_dict(A_,param_name='crop_size'					)

            __UpperCamelCase =			do_resize
            __UpperCamelCase =			size
            __UpperCamelCase =			crop_pct
            __UpperCamelCase =			resample
            __UpperCamelCase =			do_center_crop
            __UpperCamelCase =			crop_size
            __UpperCamelCase =			do_rescale
            __UpperCamelCase =			rescale_factor
            __UpperCamelCase =			do_normalize
            __UpperCamelCase =			image_mean if image_mean is not None else IMAGENET_DEFAULT_MEAN
            __UpperCamelCase =			image_std if image_std is not None else IMAGENET_DEFAULT_STD







       def 		snake_case_	(			self: Union[str, Any],A_: np.ndarray,A_: Dict[str, int],A_: Optional[float] = None,A_: PILImageResampling = PILImageResampling.BICUBIC,A_: Optional[Union[str, ChannelDimension]] = None,**A_: List[Any],):






            '''simple docstring'''




            __UpperCamelCase =			get_size_dict(A_,default_to_square=A_					)
            if "shortest_edge" not in size and ("height" not in size or "width" not in size):
                 raise ValueError(F'''size must contain \'height\' and \'width\' or \'shortest_edge\' as keys. Got {size.keys()}'''					)
            if crop_pct is not None:
                 if "shortest_edge" in size:
                      __UpperCamelCase =			int(size['shortest_edge'] / crop_pct					)
                 elif "height" in size and "width" in size:
                      if size["height"] == size["width"]:
                           __UpperCamelCase =			int(size['height'] / crop_pct					)
                      else:
                           __UpperCamelCase =			(int(size['height'] / crop_pct					), int(size['width'] / crop_pct					))
                 else:
                      raise ValueError('Invalid size for resize: {}'.format(A_					)					)

                 __UpperCamelCase =			get_resize_output_image_size(A_,size=A_,default_to_square=A_					)
            else:
                 if "shortest_edge" in size:
                      __UpperCamelCase =			get_resize_output_image_size(A_,size=size['shortest_edge'],default_to_square=A_					)
                 elif "height" in size and "width" in size:
                      __UpperCamelCase =			(size['height'], size['width'])
                 else:
                      raise ValueError('Invalid size for resize: {}'.format(A_					)					)

            return resize(A_,size=A_,resample=A_,data_format=A_,**A_					)







       def 		snake_case_	(			self: int,A_: np.ndarray,A_: Dict[str, int],A_: Optional[Union[str, ChannelDimension]] = None,**A_: str,):






            '''simple docstring'''




            __UpperCamelCase =			get_size_dict(A_					)
            if "height" not in size or "width" not in size:
                 raise ValueError(F'''size must contain \'height\' and \'width\' as keys. Got {size.keys()}'''					)
            return center_crop(A_,size=(size['height'], size['width']),data_format=A_,**A_					)







       def 		snake_case_	(			self: Optional[Any],A_: np.ndarray,A_: Union[int, float],A_: Optional[Union[str, ChannelDimension]] = None,**A_: Optional[int],):






            '''simple docstring'''




            return rescale(A_,scale=A_,data_format=A_,**A_					)







       def 		snake_case_	(			self: List[Any],A_: np.ndarray,A_: Union[float, List[float]],A_: Union[float, List[float]],A_: Optional[Union[str, ChannelDimension]] = None,**A_: Any,):






            '''simple docstring'''




            return normalize(A_,mean=A_,std=A_,data_format=A_,**A_					)







       def 		snake_case_	(			self: Tuple,A_: ImageInput,A_: bool = None,A_: Dict[str, int] = None,A_: int = None,A_: PILImageResampling = None,A_: bool = None,A_: Dict[str, int] = None,A_: bool = None,A_: float = None,A_: bool = None,A_: Optional[Union[float, List[float]]] = None,A_: Optional[Union[float, List[float]]] = None,A_: Optional[Union[str, TensorType]] = None,A_: ChannelDimension = ChannelDimension.FIRST,**A_: int,):






            '''simple docstring'''




            __UpperCamelCase =			do_resize if do_resize is not None else self.do_resize
            __UpperCamelCase =			crop_pct if crop_pct is not None else self.crop_pct
            __UpperCamelCase =			resample if resample is not None else self.resample
            __UpperCamelCase =			do_center_crop if do_center_crop is not None else self.do_center_crop
            __UpperCamelCase =			do_rescale if do_rescale is not None else self.do_rescale
            __UpperCamelCase =			rescale_factor if rescale_factor is not None else self.rescale_factor
            __UpperCamelCase =			do_normalize if do_normalize is not None else self.do_normalize
            __UpperCamelCase =			image_mean if image_mean is not None else self.image_mean
            __UpperCamelCase =			image_std if image_std is not None else self.image_std

            __UpperCamelCase =			size if size is not None else self.size
            __UpperCamelCase =			get_size_dict(A_,default_to_square=A_					)
            __UpperCamelCase =			crop_size if crop_size is not None else self.crop_size
            __UpperCamelCase =			get_size_dict(A_,param_name='crop_size'					)

            __UpperCamelCase =			make_list_of_images(A_					)

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

            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_pct is None:
                 raise ValueError('Crop_pct 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.'					)

            # All transformations expect numpy arrays.
            __UpperCamelCase =			[to_numpy_array(A_					) for image in images]

            if do_resize:
                 __UpperCamelCase =			[self.resize(image=A_,size=A_,crop_pct=A_,resample=A_					) for image in images]

            if do_center_crop:
                 __UpperCamelCase =			[self.center_crop(image=A_,size=A_					) for image in images]

            if do_rescale:
                 __UpperCamelCase =			[self.rescale(image=A_,scale=A_					) for image in images]

            if do_normalize:
                 __UpperCamelCase =			[self.normalize(image=A_,mean=A_,std=A_					) for image in images]

            __UpperCamelCase =			[to_channel_dimension_format(A_,A_					) for image in images]

            __UpperCamelCase =			{'pixel_values': images}
            return BatchFeature(data=A_,tensor_type=A_					)








def 		lowerCamelCase__       (						_A				):







	'''simple docstring'''





	snake_case_						       =	1
	for i in range(1	,      num + 1				):
		fact *= i
	return fact


def 		lowerCamelCase__       (						_A				):







	'''simple docstring'''





	snake_case_						       =	0
	while number > 0:
		snake_case_						       =	number % 10
		sum_of_digits += last_digit
		snake_case_						       =	number // 10  # Removing the last_digit from the given number
	return sum_of_digits


def 		lowerCamelCase__       (						_A = 100				):







	'''simple docstring'''





	snake_case_						       =	factorial(_A				)
	snake_case_						       =	split_and_add(_A				)
	return result


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