

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 ViTImageProcessor







class 						__magic_name__			(							unittest.TestCase							):

   '''simple docstring'''




   def __init__(				self,    lowercase_,    lowercase_=13,    lowercase_=3,    lowercase_=224,    lowercase_=30,    lowercase_=400,    lowercase_=True,    lowercase_=None,    lowercase_=True,    lowercase_=[0.5, 0.5, 0.5],    lowercase_=[0.5, 0.5, 0.5],    )							->    Tuple:






     """simple docstring"""






     a__  =size if size is not None else {'''height''': 18, '''width''': 18}
     a__  =parent
     a__  =batch_size
     a__  =num_channels
     a__  =image_size
     a__  =min_resolution
     a__  =max_resolution
     a__  =do_resize
     a__  =size
     a__  =do_normalize
     a__  =image_mean
     a__  =image_std



   def  _UpperCAmelCase (				self       )							->    int:






     """simple docstring"""






     return {
         "image_mean": self.image_mean,
         "image_std": self.image_std,
         "do_normalize": self.do_normalize,
         "do_resize": self.do_resize,
         "size": self.size,
     }







@require_torch
@require_vision
class 						__magic_name__			(							lowerCamelCase__		,       unittest.TestCase							):

   '''simple docstring'''




   lowerCamelCase__ :	Tuple    =   ViTImageProcessor if is_vision_available() else None



   def  _UpperCAmelCase (				self       )							->    int:






     """simple docstring"""






     a__  =EfficientFormerImageProcessorTester(self       )



   @property
   def  _UpperCAmelCase (				self       )							->    Optional[int]:






     """simple docstring"""






     return self.image_proc_tester.prepare_image_processor_dict()



   def  _UpperCAmelCase (				self       )							->    Any:






     """simple docstring"""






     a__  =self.image_processing_class(**self.image_processor_dict       )
     self.assertTrue(hasattr(lowercase_,    '''image_mean'''       )       )
     self.assertTrue(hasattr(lowercase_,    '''image_std'''       )       )
     self.assertTrue(hasattr(lowercase_,    '''do_normalize'''       )       )
     self.assertTrue(hasattr(lowercase_,    '''do_resize'''       )       )
     self.assertTrue(hasattr(lowercase_,    '''size'''       )       )



   def  _UpperCAmelCase (				self       )							->    Optional[Any]:






     """simple docstring"""






     pass



   def  _UpperCAmelCase (				self       )							->    Any:






     """simple docstring"""






     a__  =self.image_processing_class(**self.image_processor_dict       )
     # create random PIL images
     a__  =prepare_image_inputs(self.image_proc_tester,    equal_resolution=lowercase_       )
     for image in image_inputs:
       self.assertIsInstance(lowercase_,    Image.Image       )

     # Test not batched input
     a__  =image_processor(image_inputs[0],    return_tensors='''pt'''       ).pixel_values
     self.assertEqual(
         encoded_images.shape,    (
             1,
             self.image_proc_tester.num_channels,
             self.image_proc_tester.size['''height'''],
             self.image_proc_tester.size['''width'''],
         ),    )

     # Test batched
     a__  =image_processor(lowercase_,    return_tensors='''pt'''       ).pixel_values
     self.assertEqual(
         encoded_images.shape,    (
             self.image_proc_tester.batch_size,
             self.image_proc_tester.num_channels,
             self.image_proc_tester.size['''height'''],
             self.image_proc_tester.size['''width'''],
         ),    )



   def  _UpperCAmelCase (				self       )							->    Optional[Any]:






     """simple docstring"""






     a__  =self.image_processing_class(**self.image_processor_dict       )
     # create random numpy tensors
     a__  =prepare_image_inputs(self.image_proc_tester,    equal_resolution=lowercase_,    numpify=lowercase_       )
     for image in image_inputs:
       self.assertIsInstance(lowercase_,    np.ndarray       )

     # Test not batched input
     a__  =image_processor(image_inputs[0],    return_tensors='''pt'''       ).pixel_values
     self.assertEqual(
         encoded_images.shape,    (
             1,
             self.image_proc_tester.num_channels,
             self.image_proc_tester.size['''height'''],
             self.image_proc_tester.size['''width'''],
         ),    )

     # Test batched
     a__  =image_processor(lowercase_,    return_tensors='''pt'''       ).pixel_values
     self.assertEqual(
         encoded_images.shape,    (
             self.image_proc_tester.batch_size,
             self.image_proc_tester.num_channels,
             self.image_proc_tester.size['''height'''],
             self.image_proc_tester.size['''width'''],
         ),    )



   def  _UpperCAmelCase (				self       )							->    Any:






     """simple docstring"""






     a__  =self.image_processing_class(**self.image_processor_dict       )
     # create random PyTorch tensors
     a__  =prepare_image_inputs(self.image_proc_tester,    equal_resolution=lowercase_,    torchify=lowercase_       )
     for image in image_inputs:
       self.assertIsInstance(lowercase_,    torch.Tensor       )

     # Test not batched input
     a__  =image_processor(image_inputs[0],    return_tensors='''pt'''       ).pixel_values
     self.assertEqual(
         encoded_images.shape,    (
             1,
             self.image_proc_tester.num_channels,
             self.image_proc_tester.size['''height'''],
             self.image_proc_tester.size['''width'''],
         ),    )

     # Test batched
     a__  =image_processor(lowercase_,    return_tensors='''pt'''       ).pixel_values
     self.assertEqual(
         encoded_images.shape,    (
             self.image_proc_tester.batch_size,
             self.image_proc_tester.num_channels,
             self.image_proc_tester.size['''height'''],
             self.image_proc_tester.size['''width'''],
         ),    )



from math import factorial




def 			UpperCAmelCase__				(			_A      : int = 1_00							):





  '''simple docstring'''







  return sum(int(_A							) for x in str(factorial(_A							)							)							)


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