

'''simple docstring'''

import tempfile
import unittest

from transformers import AutoModelForSeqaSeqLM, AutoTokenizer
from transformers.testing_utils import (
    is_torch_available,
    require_optimum,
    require_torch,
    slow,
)


if is_torch_available():
							import torch






@require_torch
@require_optimum
@slow
class    snake_case     (      unittest.TestCase		):






				"""simple docstring"""



				def   a__					(    self       )     ->							int:
											SCREAMING_SNAKE_CASE_				=				'hf-internal-testing/tiny-random-t5'
											SCREAMING_SNAKE_CASE_				=				AutoTokenizer.from_pretrained(_lowercase       )
											SCREAMING_SNAKE_CASE_				=				AutoModelForSeqaSeqLM.from_pretrained(_lowercase       )

											SCREAMING_SNAKE_CASE_				=				tokenizer('This is me',     return_tensors='pt'       )

											SCREAMING_SNAKE_CASE_				=				model.to_bettertransformer()

											self.assertTrue(any('BetterTransformer' in mod.__class__.__name__ for _, mod in model.named_modules()       )       )

											SCREAMING_SNAKE_CASE_				=				model.generate(**_lowercase       )

											SCREAMING_SNAKE_CASE_				=				model.reverse_bettertransformer()

											self.assertFalse(any('BetterTransformer' in mod.__class__.__name__ for _, mod in model.named_modules()       )       )

											with tempfile.TemporaryDirectory() as tmpdirname:
																		model.save_pretrained(_lowercase       )

																		SCREAMING_SNAKE_CASE_				=				AutoModelForSeqaSeqLM.from_pretrained(_lowercase       )

																		self.assertFalse(
																		    any('BetterTransformer' in mod.__class__.__name__ for _, mod in model_reloaded.named_modules()       )       )

																		SCREAMING_SNAKE_CASE_				=				model_reloaded.generate(**_lowercase       )
																		self.assertTrue(torch.allclose(_lowercase,     _lowercase       )       )





				def   a__					(    self       )     ->							Optional[int]:
											SCREAMING_SNAKE_CASE_				=				'hf-internal-testing/tiny-random-t5'
											SCREAMING_SNAKE_CASE_				=				AutoModelForSeqaSeqLM.from_pretrained(_lowercase       )

											SCREAMING_SNAKE_CASE_				=				model.to_bettertransformer()

											with tempfile.TemporaryDirectory() as tmpdirname:
																		with self.assertRaises(_lowercase       ):
																									model.save_pretrained(_lowercase       )

																		SCREAMING_SNAKE_CASE_				=				model.reverse_bettertransformer()
																		model.save_pretrained(_lowercase       )








'''simple docstring'''

from math import factorial




def 							_UpperCamelCase				(   lowerCAmelCase__:					int = 100   )      -> int:
							return sum(map(lowerCAmelCase__		,str(factorial(lowerCAmelCase__   )   )   )   )


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





