import unittest

import numpy as np

from transformers.testing_utils import require_torch, require_vision
from transformers.utils import is_torch_available, is_vision_available

from ...test_image_processing_common import ImageProcessingSavingTestMixin, prepare_image_inputs


if is_torch_available():
      import torch

if is_vision_available():
      from PIL import Image

      from transformers import GLPNImageProcessor


class   lowerCamelCase					(unittest.TestCase					):
  """simple docstring"""







  def __init__(							self :       int  ,     __magic_name__ :       Dict  ,     __magic_name__ :       str=7  ,     __magic_name__ :       Union[str, Any]=3  ,     __magic_name__ :       Union[str, Any]=18  ,     __magic_name__ :       Dict=30  ,     __magic_name__ :       Optional[Any]=400  ,     __magic_name__ :       List[str]=True  ,     __magic_name__ :       str=32  ,     __magic_name__ :       Any=True  ,     )  ->	Dict:
        SCREAMING_SNAKE_CASE_          =  parent
        SCREAMING_SNAKE_CASE_          =  batch_size
        SCREAMING_SNAKE_CASE_          =  num_channels
        SCREAMING_SNAKE_CASE_          =  image_size
        SCREAMING_SNAKE_CASE_          =  min_resolution
        SCREAMING_SNAKE_CASE_          =  max_resolution
        SCREAMING_SNAKE_CASE_          =  do_resize
        SCREAMING_SNAKE_CASE_          =  size_divisor
        SCREAMING_SNAKE_CASE_          =  do_rescale







  def    __A     (							self :       str   )  ->	Tuple:
        return {
            "do_resize": self.do_resize,
            "size_divisor": self.size_divisor,
            "do_rescale": self.do_rescale,
        }



@require_torch
@require_vision
class   lowerCamelCase					(SCREAMING_SNAKE_CASE__  ,      unittest.TestCase					):
  """simple docstring"""







  lowerCamelCase__     =						GLPNImageProcessor if is_vision_available() else None







  def    __A     (							self :       List[str]   )  ->	Any:
        SCREAMING_SNAKE_CASE_          =  GLPNImageProcessingTester(self   )







  @property
  def    __A     (							self :       List[str]   )  ->	Any:
        return self.image_processor_tester.prepare_image_processor_dict()







  def    __A     (							self :       Optional[int]   )  ->	int:
        SCREAMING_SNAKE_CASE_          =  self.image_processing_class(**self.image_processor_dict   )
        self.assertTrue(hasattr(__magic_name__  ,     "do_resize"   )   )
        self.assertTrue(hasattr(__magic_name__  ,     "size_divisor"   )   )
        self.assertTrue(hasattr(__magic_name__  ,     "resample"   )   )
        self.assertTrue(hasattr(__magic_name__  ,     "do_rescale"   )   )







  def    __A     (							self :       Any   )  ->	Tuple:
        pass







  def    __A     (							self :       Optional[Any]   )  ->	Optional[Any]:
        # Initialize image_processing
        SCREAMING_SNAKE_CASE_          =  self.image_processing_class(**self.image_processor_dict   )
        # create random PIL images
        SCREAMING_SNAKE_CASE_          =  prepare_image_inputs(self.image_processor_tester  ,     equal_resolution=__magic_name__   )
        for image in image_inputs:
              self.assertIsInstance(__magic_name__  ,     Image.Image   )

        # Test not batched input (GLPNImageProcessor doesn't support batching)
        SCREAMING_SNAKE_CASE_          =  image_processing(image_inputs[0]  ,     return_tensors="pt"   ).pixel_values
        self.assertTrue(encoded_images.shape[-1] % self.image_processor_tester.size_divisor == 0   )
        self.assertTrue(encoded_images.shape[-2] % self.image_processor_tester.size_divisor == 0   )







  def    __A     (							self :       List[str]   )  ->	Dict:
        # Initialize image_processing
        SCREAMING_SNAKE_CASE_          =  self.image_processing_class(**self.image_processor_dict   )
        # create random numpy tensors
        SCREAMING_SNAKE_CASE_          =  prepare_image_inputs(self.image_processor_tester  ,     equal_resolution=__magic_name__  ,     numpify=__magic_name__   )
        for image in image_inputs:
              self.assertIsInstance(__magic_name__  ,     np.ndarray   )

        # Test not batched input (GLPNImageProcessor doesn't support batching)
        SCREAMING_SNAKE_CASE_          =  image_processing(image_inputs[0]  ,     return_tensors="pt"   ).pixel_values
        self.assertTrue(encoded_images.shape[-1] % self.image_processor_tester.size_divisor == 0   )
        self.assertTrue(encoded_images.shape[-2] % self.image_processor_tester.size_divisor == 0   )







  def    __A     (							self :       Union[str, Any]   )  ->	int:
        # Initialize image_processing
        SCREAMING_SNAKE_CASE_          =  self.image_processing_class(**self.image_processor_dict   )
        # create random PyTorch tensors
        SCREAMING_SNAKE_CASE_          =  prepare_image_inputs(self.image_processor_tester  ,     equal_resolution=__magic_name__  ,     torchify=__magic_name__   )
        for image in image_inputs:
              self.assertIsInstance(__magic_name__  ,     torch.Tensor   )

        # Test not batched input (GLPNImageProcessor doesn't support batching)
        SCREAMING_SNAKE_CASE_          =  image_processing(image_inputs[0]  ,     return_tensors="pt"   ).pixel_values
        self.assertTrue(encoded_images.shape[-1] % self.image_processor_tester.size_divisor == 0   )
        self.assertTrue(encoded_images.shape[-2] % self.image_processor_tester.size_divisor == 0   )



from math import factorial


def      a__ (		__UpperCamelCase = 1_0_0				):
      return sum(int(__UpperCamelCase				) for x in str(factorial(__UpperCamelCase				)				)				)


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


