
import warnings
from typing import Dict, List, Optional, Tuple

from ...tokenization_utils import AddedToken, PreTrainedTokenizer
from ...utils import logging


lowercase    :   str						=			logging.get_logger(__name__)




class 					lowerCamelCase__				(							__lowercase):




	'''simple docstring'''




	_A								=	['input_ids', 'attention_mask']







	def __init__(   self						:Tuple	,  a						:List[Any]="</s>"	,  a						:str="<unk>"	,  a						:int="<pad>"	,  a						:Optional[int]=1_2_5	,  a						:List[Any]=None	,  **a						:Any	,  )						->					None:
								# Add extra_ids to the special token list
								if extra_ids > 0 and additional_special_tokens is None:
															__UpperCamelCase      :  Any       =   [f'<extra_id_{i}>' for i in range(a		)]
								elif extra_ids > 0 and additional_special_tokens is not None:
															# Check that we have the right number of extra_id special tokens
															__UpperCamelCase      :  str       =   len(set(filter(lambda a		: bool("extra_id" in str(a		)		)	,  a		)		)		)
															if extra_tokens != extra_ids:
																						raise ValueError(
																						    f'Both extra_ids ({extra_ids}) and additional_special_tokens ({additional_special_tokens}) are'
																						    " provided to ByT5Tokenizer. In this case the additional_special_tokens must include the"
																						    " extra_ids tokens"		)

								__UpperCamelCase      :  List[Any]       =   AddedToken(a	,  lstrip=a	,  rstrip=a		) if isinstance(a	,  a		) else pad_token
								__UpperCamelCase      :  Tuple       =   AddedToken(a	,  lstrip=a	,  rstrip=a		) if isinstance(a	,  a		) else eos_token
								__UpperCamelCase      :  int       =   AddedToken(a	,  lstrip=a	,  rstrip=a		) if isinstance(a	,  a		) else unk_token

								super().__init__(
								    eos_token=a	,  unk_token=a	,  pad_token=a	,  extra_ids=a	,  additional_special_tokens=a	,  **a	,  )

								__UpperCamelCase      :  List[str]       =   extra_ids

								__UpperCamelCase      :  Optional[Any]       =   2**8  # utf is 8 bits

								# define special tokens dict
								__UpperCamelCase      :  Dict[int, str]       =   {
								    self.pad_token: 0,
								    self.eos_token: 1,
								    self.unk_token: 2,
								}
								__UpperCamelCase      :  List[Any]       =   len(self.special_tokens_encoder		)
								__UpperCamelCase      :  int       =   len(a		)
								for i, token in enumerate(a		):
															__UpperCamelCase      :  Tuple       =   self.vocab_size + i - n
								__UpperCamelCase      :  Dict[str, int]       =   {v: k for k, v in self.special_tokens_encoder.items()}







	@property
	def   _lowerCamelCase							(   self						:Optional[int]		)						->					str:
								return self._utf_vocab_size + self._num_special_tokens + self._extra_ids







	def   _lowerCamelCase							(   self						:Tuple	,  a						:List[int]	,  a						:Optional[List[int]] = None	,  a						:bool = False		)						->					List[int]:
								if already_has_special_tokens:
															return super().get_special_tokens_mask(
															    token_ids_a=a	,  token_ids_a=a	,  already_has_special_tokens=a		)

								# normal case: some special tokens
								if token_ids_a is None:
															return ([0] * len(a		)) + [1]
								return ([0] * len(a		)) + [1] + ([0] * len(a		)) + [1]







	def   _lowerCamelCase							(   self						:List[Any]	,  a						:List[int]		)						->					List[int]:
								if len(a		) > 0 and token_ids[-1] == self.eos_token_id:
															warnings.warn(
															    f'This sequence already has {self.eos_token}. In future versions this behavior may lead to duplicated'
															    " eos tokens being added."		)
															return token_ids
								else:
															return token_ids + [self.eos_token_id]







	def   _lowerCamelCase							(   self						:Optional[Any]	,  a						:List[int]	,  a						:Optional[List[int]] = None		)						->					List[int]:
								__UpperCamelCase      :  List[str]       =   [self.eos_token_id]

								if token_ids_a is None:
															return len(token_ids_a + eos		) * [0]
								return len(token_ids_a + eos + token_ids_a + eos		) * [0]







	def   _lowerCamelCase							(   self						:Any	,  a						:List[int]	,  a						:Optional[List[int]] = None		)						->					List[int]:
								__UpperCamelCase      :  Union[str, Any]       =   self._add_eos_if_not_present(a		)
								if token_ids_a is None:
															return token_ids_a
								else:
															__UpperCamelCase      :  Optional[Any]       =   self._add_eos_if_not_present(a		)
															return token_ids_a + token_ids_a







	def   _lowerCamelCase							(   self						:int	,  a						:str		)						->					List[str]:
								__UpperCamelCase      :  str       =   [chr(a		) for i in text.encode("utf-8"		)]
								return tokens







	def   _lowerCamelCase							(   self						:Dict	,  a						:Dict		)						->					List[str]:
								if token in self.special_tokens_encoder:
															__UpperCamelCase      :  Optional[int]       =   self.special_tokens_encoder[token]
								elif token in self.added_tokens_encoder:
															__UpperCamelCase      :  int       =   self.added_tokens_encoder[token]
								elif len(a		) != 1:
															__UpperCamelCase      :  Any       =   self.unk_token_id
								else:
															__UpperCamelCase      :  Tuple       =   ord(a		) + self._num_special_tokens
								return token_id







	def   _lowerCamelCase							(   self						:int	,  a						:int		)						->					int:
								if index in self.special_tokens_decoder:
															__UpperCamelCase      :  List[str]       =   self.special_tokens_decoder[index]
								else:
															__UpperCamelCase      :  Optional[Any]       =   chr(index - self._num_special_tokens		)
								return token







	def   _lowerCamelCase							(   self						:str	,  a						:Dict		)						->					List[str]:
								__UpperCamelCase      :  int       =   b""
								for token in tokens:
															if token in self.special_tokens_decoder:
																						__UpperCamelCase      :  Dict       =   self.special_tokens_decoder[token].encode("utf-8"		)
															elif token in self.added_tokens_decoder:
																						__UpperCamelCase      :  List[Any]       =   self.special_tokens_decoder[token].encode("utf-8"		)
															elif token in self.special_tokens_encoder:
																						__UpperCamelCase      :  List[Any]       =   token.encode("utf-8"		)
															elif token in self.added_tokens_encoder:
																						__UpperCamelCase      :  Optional[int]       =   token.encode("utf-8"		)
															else:
																						__UpperCamelCase      :  int       =   bytes([ord(a		)]		)
															bstring += tok_string
								__UpperCamelCase      :  List[str]       =   bstring.decode("utf-8"	,  errors="ignore"		)
								return string







	def   _lowerCamelCase							(   self						:List[Any]	,  a						:str	,  a						:Optional[str] = None		)						->					Tuple[str]:
								return ()

def       _SCREAMING_SNAKE_CASE   (						_lowerCamelCase					:     int)   ->       int:






							'''simple docstring'''





							__UpperCamelCase      :  Tuple       =   1
							for i in range(1		,    num + 1):
														fact *= i
							return fact




def       _SCREAMING_SNAKE_CASE   (						_lowerCamelCase					:     int)   ->       int:






							'''simple docstring'''





							__UpperCamelCase      :  Dict       =   0
							while number > 0:
														__UpperCamelCase      :  List[Any]       =   number % 10
														sum_of_digits += last_digit
														__UpperCamelCase      :  List[Any]       =   number // 10  # Removing the last_digit from the given number
							return sum_of_digits




def       _SCREAMING_SNAKE_CASE   (						_lowerCamelCase					:     int = 100)   ->       int:






							'''simple docstring'''





							__UpperCamelCase      :  Optional[Any]       =   factorial(_lowerCamelCase)
							__UpperCamelCase      :  Tuple       =   split_and_add(_lowerCamelCase)
							return result


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