


"""simple docstring"""







def _A						(						lowercase		):







    """simple docstring"""
    a					=1
    for i in range(1	,   num + 1		):
        fact *= i
    return fact
def _A						(						lowercase		):







    """simple docstring"""
    a					=0
    while number > 0:
        a					=number % 10
        sum_of_digits += last_digit
        a					=number // 10  # Removing the last_digit from the given number
    return sum_of_digits
def _A						(						lowercase = 1_00		):







    """simple docstring"""
    a					=factorial(lowercase		)
    a					=split_and_add(lowercase		)
    return result


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



"""simple docstring"""







import random
import unittest

import torch

from diffusers import IFInpaintingSuperResolutionPipeline
from diffusers.utils import floats_tensor
from diffusers.utils.import_utils import is_xformers_available
from diffusers.utils.testing_utils import skip_mps, torch_device

from ..pipeline_params import (
    TEXT_GUIDED_IMAGE_INPAINTING_BATCH_PARAMS,
    TEXT_GUIDED_IMAGE_INPAINTING_PARAMS,
)
from ..test_pipelines_common import PipelineTesterMixin
from . import IFPipelineTesterMixin






@skip_mps
class 				__A    (	_SCREAMING_SNAKE_CASE,   _SCREAMING_SNAKE_CASE,   unittest.TestCase      ):






 """simple docstring"""




 __lowerCAmelCase			 =  IFInpaintingSuperResolutionPipeline
 __lowerCAmelCase			 =  TEXT_GUIDED_IMAGE_INPAINTING_PARAMS - {"width", "height"}
 __lowerCAmelCase			 =  TEXT_GUIDED_IMAGE_INPAINTING_BATCH_PARAMS.union({"original_image"}      )
 __lowerCAmelCase			 =  PipelineTesterMixin.required_optional_params - {"latents"}


 def 				SCREAMING_SNAKE_CASE							(		self						) ->					Optional[int]:
     return self._get_superresolution_dummy_components()


 def 				SCREAMING_SNAKE_CASE							(		self			,   __A			,   __A=0						) ->					Optional[int]:
     if str(__A						).startswith('''mps'''						):
         a					=torch.manual_seed(__A						)
     else:
         a					=torch.Generator(device=__A						).manual_seed(__A						)

     a					=floats_tensor((1, 3, 16, 16)			,   rng=random.Random(__A						)						).to(__A						)
     a					=floats_tensor((1, 3, 32, 32)			,   rng=random.Random(__A						)						).to(__A						)
     a					=floats_tensor((1, 3, 32, 32)			,   rng=random.Random(__A						)						).to(__A						)

     a					={
         '''prompt''': '''A painting of a squirrel eating a burger''',
         '''image''': image,
         '''original_image''': original_image,
         '''mask_image''': mask_image,
         '''generator''': generator,
         '''num_inference_steps''': 2,
         '''output_type''': '''numpy''',
     }

     return inputs


 @unittest.skipIf(
     torch_device != '''cuda''' or not is_xformers_available()			,   reason='''XFormers attention is only available with CUDA and `xformers` installed'''			,   )
 def 				SCREAMING_SNAKE_CASE							(		self						) ->					List[Any]:
     self._test_xformers_attention_forwardGenerator_pass(expected_max_diff=1E-3						)


 def 				SCREAMING_SNAKE_CASE							(		self						) ->					Dict:
     self._test_save_load_optional_components()


 @unittest.skipIf(torch_device != '''cuda'''			,   reason='''float16 requires CUDA'''						)
 def 				SCREAMING_SNAKE_CASE							(		self						) ->					int:
     # Due to non-determinism in save load of the hf-internal-testing/tiny-random-t5 text encoder
     super().test_save_load_floataa(expected_max_diff=1E-1						)


 def 				SCREAMING_SNAKE_CASE							(		self						) ->					Any:
     self._test_attention_slicing_forward_pass(expected_max_diff=1E-2						)


 def 				SCREAMING_SNAKE_CASE							(		self						) ->					List[Any]:
     self._test_save_load_local()





 def 				SCREAMING_SNAKE_CASE							(		self						) ->					Dict:
     self._test_inference_batch_single_identical(
         expected_max_diff=1E-2			,   )