





"""simple docstring"""




import unittest

import numpy as np

from transformers.testing_utils import require_flax, require_tf, require_torch
from transformers.utils import (
    expand_dims,
    flatten_dict,
    is_flax_available,
    is_tf_available,
    is_torch_available,
    reshape,
    squeeze,
    transpose,
)


if is_flax_available():
		import jax.numpy as jnp

if is_tf_available():
		import tensorflow as tf

if is_torch_available():
		import torch


class 			__UpperCamelCase							(		unittest.TestCase		):






							def        __a  (  self )      ->					int:
								a :						List[str]      =							{
								    '''task_specific_params''': {
								        '''summarization''': {'''length_penalty''': 1.0, '''max_length''': 128, '''min_length''': 12, '''num_beams''': 4},
								        '''summarization_cnn''': {'''length_penalty''': 2.0, '''max_length''': 142, '''min_length''': 56, '''num_beams''': 4},
								        '''summarization_xsum''': {'''length_penalty''': 1.0, '''max_length''': 62, '''min_length''': 11, '''num_beams''': 6},
								    }
								}
								a :						Union[str, Any]      =							{
								    '''task_specific_params.summarization.length_penalty''': 1.0,
								    '''task_specific_params.summarization.max_length''': 128,
								    '''task_specific_params.summarization.min_length''': 12,
								    '''task_specific_params.summarization.num_beams''': 4,
								    '''task_specific_params.summarization_cnn.length_penalty''': 2.0,
								    '''task_specific_params.summarization_cnn.max_length''': 142,
								    '''task_specific_params.summarization_cnn.min_length''': 56,
								    '''task_specific_params.summarization_cnn.num_beams''': 4,
								    '''task_specific_params.summarization_xsum.length_penalty''': 1.0,
								    '''task_specific_params.summarization_xsum.max_length''': 62,
								    '''task_specific_params.summarization_xsum.min_length''': 11,
								    '''task_specific_params.summarization_xsum.num_beams''': 6,
								}

								self.assertEqual(flatten_dict(SCREAMING_SNAKE_CASE__ ) ,   SCREAMING_SNAKE_CASE__ )






							def        __a  (  self )      ->					Any:
								a :						Optional[int]      =							np.random.randn(3 ,   4 )
								self.assertTrue(np.allclose(transpose(SCREAMING_SNAKE_CASE__ ) ,   x.transpose() ) )

								a :						Tuple      =							np.random.randn(3 ,   4 ,   5 )
								self.assertTrue(np.allclose(transpose(SCREAMING_SNAKE_CASE__ ,   axes=(1, 2, 0) ) ,   x.transpose((1, 2, 0) ) ) )






							@require_torch
							def        __a  (  self )      ->					str:
								a :						Union[str, Any]      =							np.random.randn(3 ,   4 )
								a :						Any      =							torch.tensor(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(transpose(SCREAMING_SNAKE_CASE__ ) ,   transpose(SCREAMING_SNAKE_CASE__ ).numpy() ) )

								a :						int      =							np.random.randn(3 ,   4 ,   5 )
								a :						Any      =							torch.tensor(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(transpose(SCREAMING_SNAKE_CASE__ ,   axes=(1, 2, 0) ) ,   transpose(SCREAMING_SNAKE_CASE__ ,   axes=(1, 2, 0) ).numpy() ) )






							@require_tf
							def        __a  (  self )      ->					Dict:
								a :						Dict      =							np.random.randn(3 ,   4 )
								a :						List[str]      =							tf.constant(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(transpose(SCREAMING_SNAKE_CASE__ ) ,   transpose(SCREAMING_SNAKE_CASE__ ).numpy() ) )

								a :						int      =							np.random.randn(3 ,   4 ,   5 )
								a :						Dict      =							tf.constant(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(transpose(SCREAMING_SNAKE_CASE__ ,   axes=(1, 2, 0) ) ,   transpose(SCREAMING_SNAKE_CASE__ ,   axes=(1, 2, 0) ).numpy() ) )






							@require_flax
							def        __a  (  self )      ->					str:
								a :						int      =							np.random.randn(3 ,   4 )
								a :						Optional[Any]      =							jnp.array(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(transpose(SCREAMING_SNAKE_CASE__ ) ,   np.asarray(transpose(SCREAMING_SNAKE_CASE__ ) ) ) )

								a :						Dict      =							np.random.randn(3 ,   4 ,   5 )
								a :						Dict      =							jnp.array(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(transpose(SCREAMING_SNAKE_CASE__ ,   axes=(1, 2, 0) ) ,   np.asarray(transpose(SCREAMING_SNAKE_CASE__ ,   axes=(1, 2, 0) ) ) ) )






							def        __a  (  self )      ->					int:
								a :						int      =							np.random.randn(3 ,   4 )
								self.assertTrue(np.allclose(reshape(SCREAMING_SNAKE_CASE__ ,   (4, 3) ) ,   np.reshape(SCREAMING_SNAKE_CASE__ ,   (4, 3) ) ) )

								a :						Dict      =							np.random.randn(3 ,   4 ,   5 )
								self.assertTrue(np.allclose(reshape(SCREAMING_SNAKE_CASE__ ,   (12, 5) ) ,   np.reshape(SCREAMING_SNAKE_CASE__ ,   (12, 5) ) ) )






							@require_torch
							def        __a  (  self )      ->					int:
								a :						Union[str, Any]      =							np.random.randn(3 ,   4 )
								a :						Optional[Any]      =							torch.tensor(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(reshape(SCREAMING_SNAKE_CASE__ ,   (4, 3) ) ,   reshape(SCREAMING_SNAKE_CASE__ ,   (4, 3) ).numpy() ) )

								a :						str      =							np.random.randn(3 ,   4 ,   5 )
								a :						str      =							torch.tensor(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(reshape(SCREAMING_SNAKE_CASE__ ,   (12, 5) ) ,   reshape(SCREAMING_SNAKE_CASE__ ,   (12, 5) ).numpy() ) )






							@require_tf
							def        __a  (  self )      ->					Tuple:
								a :						Optional[int]      =							np.random.randn(3 ,   4 )
								a :						Dict      =							tf.constant(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(reshape(SCREAMING_SNAKE_CASE__ ,   (4, 3) ) ,   reshape(SCREAMING_SNAKE_CASE__ ,   (4, 3) ).numpy() ) )

								a :						Union[str, Any]      =							np.random.randn(3 ,   4 ,   5 )
								a :						Optional[int]      =							tf.constant(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(reshape(SCREAMING_SNAKE_CASE__ ,   (12, 5) ) ,   reshape(SCREAMING_SNAKE_CASE__ ,   (12, 5) ).numpy() ) )






							@require_flax
							def        __a  (  self )      ->					int:
								a :						List[str]      =							np.random.randn(3 ,   4 )
								a :						str      =							jnp.array(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(reshape(SCREAMING_SNAKE_CASE__ ,   (4, 3) ) ,   np.asarray(reshape(SCREAMING_SNAKE_CASE__ ,   (4, 3) ) ) ) )

								a :						Dict      =							np.random.randn(3 ,   4 ,   5 )
								a :						Union[str, Any]      =							jnp.array(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(reshape(SCREAMING_SNAKE_CASE__ ,   (12, 5) ) ,   np.asarray(reshape(SCREAMING_SNAKE_CASE__ ,   (12, 5) ) ) ) )






							def        __a  (  self )      ->					int:
								a :						Dict      =							np.random.randn(1 ,   3 ,   4 )
								self.assertTrue(np.allclose(squeeze(SCREAMING_SNAKE_CASE__ ) ,   np.squeeze(SCREAMING_SNAKE_CASE__ ) ) )

								a :						List[Any]      =							np.random.randn(1 ,   4 ,   1 ,   5 )
								self.assertTrue(np.allclose(squeeze(SCREAMING_SNAKE_CASE__ ,   axis=2 ) ,   np.squeeze(SCREAMING_SNAKE_CASE__ ,   axis=2 ) ) )






							@require_torch
							def        __a  (  self )      ->					Union[str, Any]:
								a :						str      =							np.random.randn(1 ,   3 ,   4 )
								a :						Any      =							torch.tensor(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(squeeze(SCREAMING_SNAKE_CASE__ ) ,   squeeze(SCREAMING_SNAKE_CASE__ ).numpy() ) )

								a :						List[str]      =							np.random.randn(1 ,   4 ,   1 ,   5 )
								a :						List[Any]      =							torch.tensor(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(squeeze(SCREAMING_SNAKE_CASE__ ,   axis=2 ) ,   squeeze(SCREAMING_SNAKE_CASE__ ,   axis=2 ).numpy() ) )






							@require_tf
							def        __a  (  self )      ->					int:
								a :						str      =							np.random.randn(1 ,   3 ,   4 )
								a :						str      =							tf.constant(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(squeeze(SCREAMING_SNAKE_CASE__ ) ,   squeeze(SCREAMING_SNAKE_CASE__ ).numpy() ) )

								a :						str      =							np.random.randn(1 ,   4 ,   1 ,   5 )
								a :						str      =							tf.constant(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(squeeze(SCREAMING_SNAKE_CASE__ ,   axis=2 ) ,   squeeze(SCREAMING_SNAKE_CASE__ ,   axis=2 ).numpy() ) )






							@require_flax
							def        __a  (  self )      ->					Optional[Any]:
								a :						Union[str, Any]      =							np.random.randn(1 ,   3 ,   4 )
								a :						Optional[Any]      =							jnp.array(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(squeeze(SCREAMING_SNAKE_CASE__ ) ,   np.asarray(squeeze(SCREAMING_SNAKE_CASE__ ) ) ) )

								a :						Dict      =							np.random.randn(1 ,   4 ,   1 ,   5 )
								a :						int      =							jnp.array(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(squeeze(SCREAMING_SNAKE_CASE__ ,   axis=2 ) ,   np.asarray(squeeze(SCREAMING_SNAKE_CASE__ ,   axis=2 ) ) ) )






							def        __a  (  self )      ->					Tuple:
								a :						Dict      =							np.random.randn(3 ,   4 )
								self.assertTrue(np.allclose(expand_dims(SCREAMING_SNAKE_CASE__ ,   axis=1 ) ,   np.expand_dims(SCREAMING_SNAKE_CASE__ ,   axis=1 ) ) )






							@require_torch
							def        __a  (  self )      ->					Tuple:
								a :						List[str]      =							np.random.randn(3 ,   4 )
								a :						Union[str, Any]      =							torch.tensor(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(expand_dims(SCREAMING_SNAKE_CASE__ ,   axis=1 ) ,   expand_dims(SCREAMING_SNAKE_CASE__ ,   axis=1 ).numpy() ) )






							@require_tf
							def        __a  (  self )      ->					Optional[int]:
								a :						str      =							np.random.randn(3 ,   4 )
								a :						int      =							tf.constant(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(expand_dims(SCREAMING_SNAKE_CASE__ ,   axis=1 ) ,   expand_dims(SCREAMING_SNAKE_CASE__ ,   axis=1 ).numpy() ) )






							@require_flax
							def        __a  (  self )      ->					List[Any]:
								a :						Tuple      =							np.random.randn(3 ,   4 )
								a :						str      =							jnp.array(SCREAMING_SNAKE_CASE__ )
								self.assertTrue(np.allclose(expand_dims(SCREAMING_SNAKE_CASE__ ,   axis=1 ) ,   np.asarray(expand_dims(SCREAMING_SNAKE_CASE__ ,   axis=1 ) ) ) )






"""simple docstring"""






def 				A_       ( snake_case__		)					->  int:
			_UpperCamelCase					:Dict					     =	1
			for i in range(1       ,					num + 1		):
						fact *= i
			return fact





def 				A_       ( snake_case__		)					->  int:
			_UpperCamelCase					:Dict					     =	0
			while number > 0:
						_UpperCamelCase					:Tuple					     =	number % 10
						sum_of_digits += last_digit
						_UpperCamelCase					:str					     =	number // 10  # Removing the last_digit from the given number
			return sum_of_digits





def 				A_       ( snake_case__ = 1_00		)					->  int:
			_UpperCamelCase					:int					     =	factorial(snake_case__		)
			_UpperCamelCase					:Dict					     =	split_and_add(snake_case__		)
			return result


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

