

"""simple docstring"""





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_STANDARD_MEAN,
    IMAGENET_STANDARD_STD,
    ChannelDimension,
    ImageInput,
    PILImageResampling,
    is_valid_image,
    to_numpy_array,
    valid_images,
)
from ...utils import TensorType, is_vision_available, logging


if is_vision_available():
   import PIL


_a       =							logging.get_logger(__name__)




def   _A  (  UpperCamelCase_     :       str)	->						List[List[ImageInput]]:
   '''simple docstring'''


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

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

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

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




class 					_lowerCAmelCase  (	lowercase   ):







 """simple docstring"""







 __UpperCAmelCase	:					int   		=	["pixel_values"]


 def __init__(			self							:			Optional[int],					UpperCAmelCase__							:			bool = True,					UpperCAmelCase__							:			Dict[str, int] = None,					UpperCAmelCase__							:			PILImageResampling = PILImageResampling.BILINEAR,					UpperCAmelCase__							:			bool = True,					UpperCAmelCase__							:			Dict[str, int] = None,					UpperCAmelCase__							:			bool = True,					UpperCAmelCase__							:			Union[int, float] = 1 / 2_5_5,					UpperCAmelCase__							:			bool = True,					UpperCAmelCase__							:			Optional[Union[float, List[float]]] = None,					UpperCAmelCase__							:			Optional[Union[float, List[float]]] = None,					**UpperCAmelCase__							:			Any,					):
    super().__init__(**UpperCAmelCase__	)
    __lowercase								=						size if size is not None else {"shortest_edge": 2_2_4}
    __lowercase								=						get_size_dict(UpperCAmelCase__,					default_to_square=UpperCAmelCase__	)
    __lowercase								=						crop_size if crop_size is not None else {"height": 2_2_4, "width": 2_2_4}
    __lowercase								=						get_size_dict(UpperCAmelCase__,					param_name="crop_size"	)

    __lowercase								=						do_resize
    __lowercase								=						size
    __lowercase								=						do_center_crop
    __lowercase								=						crop_size
    __lowercase								=						resample
    __lowercase								=						do_rescale
    __lowercase								=						rescale_factor
    __lowercase								=						do_normalize
    __lowercase								=						image_mean if image_mean is not None else IMAGENET_STANDARD_MEAN
    __lowercase								=						image_std if image_std is not None else IMAGENET_STANDARD_STD


 def 					_lowercase (			self							:			int,					UpperCAmelCase__							:			np.ndarray,					UpperCAmelCase__							:			Dict[str, int],					UpperCAmelCase__							:			PILImageResampling = PILImageResampling.BILINEAR,					UpperCAmelCase__							:			Optional[Union[str, ChannelDimension]] = None,					**UpperCAmelCase__							:			Optional[int],					):
    __lowercase								=						get_size_dict(UpperCAmelCase__,					default_to_square=UpperCAmelCase__	)
    if "shortest_edge" in size:
       __lowercase								=						get_resize_output_image_size(UpperCAmelCase__,					size["shortest_edge"],					default_to_square=UpperCAmelCase__	)
    elif "height" in size and "width" in size:
       __lowercase								=						(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 					_lowercase (			self							:			Union[str, Any],					UpperCAmelCase__							:			np.ndarray,					UpperCAmelCase__							:			Dict[str, int],					UpperCAmelCase__							:			Optional[Union[str, ChannelDimension]] = None,					**UpperCAmelCase__							:			int,					):
    __lowercase								=						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 					_lowercase (			self							:			Optional[Any],					UpperCAmelCase__							:			np.ndarray,					UpperCAmelCase__							:			Union[int, float],					UpperCAmelCase__							:			Optional[Union[str, ChannelDimension]] = None,					**UpperCAmelCase__							:			Optional[Any],					):
    return rescale(UpperCAmelCase__,					scale=UpperCAmelCase__,					data_format=UpperCAmelCase__,					**UpperCAmelCase__	)


 def 					_lowercase (			self							:			Optional[Any],					UpperCAmelCase__							:			np.ndarray,					UpperCAmelCase__							:			Union[float, List[float]],					UpperCAmelCase__							:			Union[float, List[float]],					UpperCAmelCase__							:			Optional[Union[str, ChannelDimension]] = None,					**UpperCAmelCase__							:			int,					):
    return normalize(UpperCAmelCase__,					mean=UpperCAmelCase__,					std=UpperCAmelCase__,					data_format=UpperCAmelCase__,					**UpperCAmelCase__	)


 def 					_lowercase (			self							:			Tuple,					UpperCAmelCase__							:			ImageInput,					UpperCAmelCase__							:			bool = None,					UpperCAmelCase__							:			Dict[str, int] = None,					UpperCAmelCase__							:			PILImageResampling = None,					UpperCAmelCase__							:			bool = None,					UpperCAmelCase__							:			Dict[str, int] = None,					UpperCAmelCase__							:			bool = None,					UpperCAmelCase__							:			float = None,					UpperCAmelCase__							:			bool = None,					UpperCAmelCase__							:			Optional[Union[float, List[float]]] = None,					UpperCAmelCase__							:			Optional[Union[float, List[float]]] = None,					UpperCAmelCase__							:			Optional[ChannelDimension] = 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."	)

    # All transformations expect numpy arrays.
    __lowercase								=						to_numpy_array(UpperCAmelCase__	)

    if do_resize:
       __lowercase								=						self.resize(image=UpperCAmelCase__,					size=UpperCAmelCase__,					resample=UpperCAmelCase__	)

    if do_center_crop:
       __lowercase								=						self.center_crop(UpperCAmelCase__,					size=UpperCAmelCase__	)

    if do_rescale:
       __lowercase								=						self.rescale(image=UpperCAmelCase__,					scale=UpperCAmelCase__	)

    if do_normalize:
       __lowercase								=						self.normalize(image=UpperCAmelCase__,					mean=UpperCAmelCase__,					std=UpperCAmelCase__	)

    __lowercase								=						to_channel_dimension_format(UpperCAmelCase__,					UpperCAmelCase__	)
    return image



 def 					_lowercase (			self							:			List[str],					UpperCAmelCase__							:			ImageInput,					UpperCAmelCase__							:			bool = None,					UpperCAmelCase__							:			Dict[str, int] = None,					UpperCAmelCase__							:			PILImageResampling = None,					UpperCAmelCase__							:			bool = None,					UpperCAmelCase__							:			Dict[str, int] = None,					UpperCAmelCase__							:			bool = None,					UpperCAmelCase__							:			float = None,					UpperCAmelCase__							:			bool = None,					UpperCAmelCase__							:			Optional[Union[float, List[float]]] = None,					UpperCAmelCase__							:			Optional[Union[float, List[float]]] = None,					UpperCAmelCase__							:			Optional[Union[str, TensorType]] = None,					UpperCAmelCase__							:			ChannelDimension = ChannelDimension.FIRST,					**UpperCAmelCase__							:			Optional[Any],					):
    __lowercase								=						do_resize if do_resize is not None else self.do_resize
    __lowercase								=						resample if resample is not None else self.resample
    __lowercase								=						do_center_crop if do_center_crop is not None else self.do_center_crop
    __lowercase								=						do_rescale if do_rescale is not None else self.do_rescale
    __lowercase								=						rescale_factor if rescale_factor is not None else self.rescale_factor
    __lowercase								=						do_normalize if do_normalize is not None else self.do_normalize
    __lowercase								=						image_mean if image_mean is not None else self.image_mean
    __lowercase								=						image_std if image_std is not None else self.image_std

    __lowercase								=						size if size is not None else self.size
    __lowercase								=						get_size_dict(UpperCAmelCase__,					default_to_square=UpperCAmelCase__	)
    __lowercase								=						crop_size if crop_size is not None else self.crop_size
    __lowercase								=						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."	)

    __lowercase								=						make_batched(UpperCAmelCase__	)

    __lowercase								=						[
        [
            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__,					do_normalize=UpperCAmelCase__,					image_mean=UpperCAmelCase__,					image_std=UpperCAmelCase__,					data_format=UpperCAmelCase__,					)
            for img in video
        ]
        for video in videos
    ]

    __lowercase								=						{"pixel_values": videos}
    return BatchFeature(data=UpperCAmelCase__,					tensor_type=UpperCAmelCase__	)







"""simple docstring"""





from math import sqrt




def   _A  (  UpperCamelCase_     :       int)	->						int:
   '''simple docstring'''


   __lowercase								=						0
   for i in range(1,			int(sqrt(UpperCamelCase_) + 1)):
      if n % i == 0 and i != sqrt(UpperCamelCase_):
         total += i + n // i
      elif i == sqrt(UpperCamelCase_):
         total += i
   return total - n




def   _A  (  UpperCamelCase_     :       int = 10000)	->						int:
   '''simple docstring'''


   __lowercase								=						sum(
       i
       for i in range(1,			UpperCamelCase_)
       if sum_of_divisors(sum_of_divisors(UpperCamelCase_)) == i and sum_of_divisors(UpperCamelCase_) != i)
   return total


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




