


"""simple docstring"""






import re
import warnings
from contextlib import contextmanager

from ...processing_utils import ProcessorMixin






class      A(  lowerCamelCase__		):

		"""simple docstring"""





		A    =							["image_processor", "tokenizer"]
		A    =							"AutoImageProcessor"
		A    =							"AutoTokenizer"
		def __init__( self					,				SCREAMING_SNAKE_CASE__=None					,				SCREAMING_SNAKE_CASE__=None					,				**SCREAMING_SNAKE_CASE__   )      ->	Optional[Any]:

					"""simple docstring"""



					_UpperCamelCase					:List[Any]					     =	None
					if "feature_extractor" in kwargs:
								warnings.warn(
								    '''The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`'''
								    ''' instead.'''					,				SCREAMING_SNAKE_CASE__					,				)
								_UpperCamelCase					:Tuple					     =	kwargs.pop('''feature_extractor'''   )

					_UpperCamelCase					:int					     =	image_processor if image_processor is not None else feature_extractor
					if image_processor is None:
								raise ValueError('''You need to specify an `image_processor`.'''   )
					if tokenizer is None:
								raise ValueError('''You need to specify a `tokenizer`.'''   )

					super().__init__(SCREAMING_SNAKE_CASE__					,				SCREAMING_SNAKE_CASE__   )
					_UpperCamelCase					:List[Any]					     =	self.image_processor
					_UpperCamelCase					:Any					     =	False
		def __call__( self					,				*SCREAMING_SNAKE_CASE__					,				**SCREAMING_SNAKE_CASE__   )      ->	Tuple:

					"""simple docstring"""



					if self._in_target_context_manager:
								return self.current_processor(*SCREAMING_SNAKE_CASE__					,				**SCREAMING_SNAKE_CASE__   )

					_UpperCamelCase					:Dict					     =	kwargs.pop('''images'''					,				SCREAMING_SNAKE_CASE__   )
					_UpperCamelCase					:Any					     =	kwargs.pop('''text'''					,				SCREAMING_SNAKE_CASE__   )
					if len(SCREAMING_SNAKE_CASE__   ) > 0:
								_UpperCamelCase					:List[Any]					     =	args[0]
								_UpperCamelCase					:Tuple					     =	args[1:]

					if images is None and text is None:
								raise ValueError('''You need to specify either an `images` or `text` input to process.'''   )

					if images is not None:
								_UpperCamelCase					:Tuple					     =	self.image_processor(SCREAMING_SNAKE_CASE__					,				*SCREAMING_SNAKE_CASE__					,				**SCREAMING_SNAKE_CASE__   )
					if text is not None:
								_UpperCamelCase					:List[str]					     =	self.tokenizer(SCREAMING_SNAKE_CASE__					,				**SCREAMING_SNAKE_CASE__   )

					if text is None:
								return inputs
					elif images is None:
								return encodings
					else:
								_UpperCamelCase					:Tuple					     =	encodings['''input_ids''']
								return inputs
		def   _UpperCamelCase( self					,				*SCREAMING_SNAKE_CASE__					,				**SCREAMING_SNAKE_CASE__   )      ->	Union[str, Any]:

					"""simple docstring"""



					return self.tokenizer.batch_decode(*SCREAMING_SNAKE_CASE__					,				**SCREAMING_SNAKE_CASE__   )
		def   _UpperCamelCase( self					,				*SCREAMING_SNAKE_CASE__					,				**SCREAMING_SNAKE_CASE__   )      ->	Tuple:

					"""simple docstring"""



					return self.tokenizer.decode(*SCREAMING_SNAKE_CASE__					,				**SCREAMING_SNAKE_CASE__   )
		@contextmanager
		def   _UpperCamelCase( self   )      ->	int:

					"""simple docstring"""



					warnings.warn(
					    '''`as_target_processor` is deprecated and will be removed in v5 of Transformers. You can process your '''
					    '''labels by using the argument `text` of the regular `__call__` method (either in the same call as '''
					    '''your images inputs, or in a separate call.'''   )
					_UpperCamelCase					:int					     =	True
					_UpperCamelCase					:Optional[int]					     =	self.tokenizer
					yield
					_UpperCamelCase					:Tuple					     =	self.image_processor
					_UpperCamelCase					:List[Any]					     =	False
		def   _UpperCamelCase( self					,				SCREAMING_SNAKE_CASE__					,				SCREAMING_SNAKE_CASE__=False					,				SCREAMING_SNAKE_CASE__=None   )      ->	Optional[int]:

					"""simple docstring"""



					if added_vocab is None:
								_UpperCamelCase					:Optional[int]					     =	self.tokenizer.get_added_vocab()

					_UpperCamelCase					:str					     =	{}

					while tokens:
								_UpperCamelCase					:Dict					     =	re.search(r'''<s_(.*?)>'''					,				SCREAMING_SNAKE_CASE__					,				re.IGNORECASE   )
								if start_token is None:
											break
								_UpperCamelCase					:str					     =	start_token.group(1   )
								_UpperCamelCase					:Dict					     =	re.search(rf"</s_{key}>"					,				SCREAMING_SNAKE_CASE__					,				re.IGNORECASE   )
								_UpperCamelCase					:List[Any]					     =	start_token.group()
								if end_token is None:
											_UpperCamelCase					:Optional[Any]					     =	tokens.replace(SCREAMING_SNAKE_CASE__					,				''''''   )
								else:
											_UpperCamelCase					:Dict					     =	end_token.group()
											_UpperCamelCase					:List[str]					     =	re.escape(SCREAMING_SNAKE_CASE__   )
											_UpperCamelCase					:List[Any]					     =	re.escape(SCREAMING_SNAKE_CASE__   )
											_UpperCamelCase					:str					     =	re.search(f"{start_token_escaped}(.*?){end_token_escaped}"					,				SCREAMING_SNAKE_CASE__					,				re.IGNORECASE   )
											if content is not None:
														_UpperCamelCase					:str					     =	content.group(1   ).strip()
														if r"<s_" in content and r"</s_" in content:  # non-leaf node
																	_UpperCamelCase					:List[str]					     =	self.tokenajson(SCREAMING_SNAKE_CASE__					,				is_inner_value=SCREAMING_SNAKE_CASE__					,				added_vocab=SCREAMING_SNAKE_CASE__   )
																	if value:
																				if len(SCREAMING_SNAKE_CASE__   ) == 1:
																							_UpperCamelCase					:List[str]					     =	value[0]
																				_UpperCamelCase					:List[Any]					     =	value
														else:  # leaf nodes
																	_UpperCamelCase					:Any					     =	[]
																	for leaf in content.split(r'''<sep/>'''   ):
																				_UpperCamelCase					:Tuple					     =	leaf.strip()
																				if leaf in added_vocab and leaf[0] == "<" and leaf[-2:] == "/>":
																							_UpperCamelCase					:Optional[int]					     =	leaf[1:-2]  # for categorical special tokens
																				output[key].append(SCREAMING_SNAKE_CASE__   )
																	if len(output[key]   ) == 1:
																				_UpperCamelCase					:Any					     =	output[key][0]

											_UpperCamelCase					:int					     =	tokens[tokens.find(SCREAMING_SNAKE_CASE__   ) + len(SCREAMING_SNAKE_CASE__   ) :].strip()
											if tokens[:6] == r"<sep/>":  # non-leaf nodes
														return [output] + self.tokenajson(tokens[6:]					,				is_inner_value=SCREAMING_SNAKE_CASE__					,				added_vocab=SCREAMING_SNAKE_CASE__   )

					if len(SCREAMING_SNAKE_CASE__   ):
								return [output] if is_inner_value else output
					else:
								return [] if is_inner_value else {"text_sequence": tokens}
		@property
		def   _UpperCamelCase( self   )      ->	Any:

					"""simple docstring"""



					warnings.warn(
					    '''`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.'''					,				SCREAMING_SNAKE_CASE__					,				)
					return self.image_processor_class





		@property
		def   _UpperCamelCase( self   )      ->	str:

					"""simple docstring"""



					warnings.warn(
					    '''`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.'''					,				SCREAMING_SNAKE_CASE__					,				)
					return self.image_processor





"""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())))

