



import unittest
from dataclasses import dataclass
from typing import List, Union

import numpy as np
import PIL.Image

from diffusers.utils.outputs import BaseOutput







@dataclass
class       _snake_case				(     __snake_case ):






   '''simple docstring'''






   A__      : Union[List[PIL.Image.Image], np.ndarray]







class       _snake_case				(     unittest.TestCase ):






   '''simple docstring'''






   def       A__    (    self:     Optional[Any]							)	->      Any:
       UpperCAmelCase_     :       Tuple  		=					CustomOutput(images=np.random.rand(1  ,3  ,4  ,4							)							)

       # check every way of getting the attribute
       assert isinstance(outputs.images  ,np.ndarray							)
       assert outputs.images.shape == (1, 3, 4, 4)
       assert isinstance(outputs["""images"""]  ,np.ndarray							)
       assert outputs["images"].shape == (1, 3, 4, 4)
       assert isinstance(outputs[0]  ,np.ndarray							)
       assert outputs[0].shape == (1, 3, 4, 4)

       # test with a non-tensor attribute
       UpperCAmelCase_     :       Optional[int]  		=					CustomOutput(images=[PIL.Image.new("""RGB"""  ,(4, 4)							)]							)

       # check every way of getting the attribute
       assert isinstance(outputs.images  ,lowerCamelCase_							)
       assert isinstance(outputs.images[0]  ,PIL.Image.Image							)
       assert isinstance(outputs["""images"""]  ,lowerCamelCase_							)
       assert isinstance(outputs["""images"""][0]  ,PIL.Image.Image							)
       assert isinstance(outputs[0]  ,lowerCamelCase_							)
       assert isinstance(outputs[0][0]  ,PIL.Image.Image							)






   def       A__    (    self:     Any							)	->      Any:
       # test output reinitialization with a `dict` for compatibility with `accelerate`
       UpperCAmelCase_     :       Any  		=					CustomOutput({"""images""": np.random.rand(1  ,3  ,4  ,4							)}							)

       # check every way of getting the attribute
       assert isinstance(outputs.images  ,np.ndarray							)
       assert outputs.images.shape == (1, 3, 4, 4)
       assert isinstance(outputs["""images"""]  ,np.ndarray							)
       assert outputs["images"].shape == (1, 3, 4, 4)
       assert isinstance(outputs[0]  ,np.ndarray							)
       assert outputs[0].shape == (1, 3, 4, 4)

       # test with a non-tensor attribute
       UpperCAmelCase_     :       Optional[Any]  		=					CustomOutput({"""images""": [PIL.Image.new("""RGB"""  ,(4, 4)							)]}							)

       # check every way of getting the attribute
       assert isinstance(outputs.images  ,lowerCamelCase_							)
       assert isinstance(outputs.images[0]  ,PIL.Image.Image							)
       assert isinstance(outputs["""images"""]  ,lowerCamelCase_							)
       assert isinstance(outputs["""images"""][0]  ,PIL.Image.Image							)
       assert isinstance(outputs[0]  ,lowerCamelCase_							)
       assert isinstance(outputs[0][0]  ,PIL.Image.Image							)

"""simple docstring"""







def     __UpperCAmelCase							(       UpperCAmelCase_       :							int = 1_00    )				->     int:

	'''simple docstring'''





	__snake_case     :				Any 						=					1
	__snake_case     :				Tuple 						=					0
	for i in range(1     ,				num + 1    ):
		fact *= i

	for j in str(UpperCAmelCase_    ):
		result += int(UpperCAmelCase_    )

	return result


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





