





import json
from typing import Iterator, List, Union

from tokenizers import AddedToken, Regex, Tokenizer, decoders, normalizers, pre_tokenizers, trainers
from tokenizers.implementations.base_tokenizer import BaseTokenizer
from tokenizers.models import Unigram
from tokenizers.processors import TemplateProcessing







class 	__lowerCAmelCase      (       _UpperCamelCase	):





   def __init__(			self       ,      snake_case = "▁"       ,      snake_case = True       ,      snake_case = "<unk>"       ,      snake_case = "</s>"       ,      snake_case = "<pad>"       ,      )					->	Any:
      """simple docstring"""





      a__						:    List[str]   		=	{
          "pad": {"id": 0, "token": pad_token},
          "eos": {"id": 1, "token": eos_token},
          "unk": {"id": 2, "token": unk_token},
      }

      a__						:    List[str]   		=	[None] * len(self.special_tokens   )
      for token_dict in self.special_tokens.values():
         a__						:    List[Any]   		=	token_dict["token"]

      a__						:    Dict   		=	Tokenizer(Unigram()   )

      a__						:    Union[str, Any]   		=	normalizers.Sequence(
          [
              normalizers.Nmt(),
              normalizers.NFKC(),
              normalizers.Replace(Regex(" {2,}"   )       ,      " "   ),
              normalizers.Lowercase(),
          ]   )
      a__						:    List[Any]   		=	pre_tokenizers.Sequence(
          [
              pre_tokenizers.Metaspace(replacement=snake_case       ,      add_prefix_space=snake_case   ),
              pre_tokenizers.Digits(individual_digits=snake_case   ),
              pre_tokenizers.Punctuation(),
          ]   )
      a__						:    Any   		=	decoders.Metaspace(replacement=snake_case       ,      add_prefix_space=snake_case   )

      a__						:    int   		=	TemplateProcessing(
          single=F"""$A {self.special_tokens["eos"]["token"]}"""       ,      special_tokens=[(self.special_tokens["eos"]["token"], self.special_tokens["eos"]["id"])]       ,      )

      a__						:    int   		=	{
          "model": "SentencePieceUnigram",
          "replacement": replacement,
          "add_prefix_space": add_prefix_space,
      }

      super().__init__(snake_case       ,      snake_case   )





   def 						_snake_case			(			self       ,      snake_case       ,      snake_case = 8_000       ,      snake_case = True       ,      )					->	List[str]:
      """simple docstring"""





      a__						:    Any   		=	trainers.UnigramTrainer(
          vocab_size=snake_case       ,      special_tokens=self.special_tokens_list       ,      show_progress=snake_case       ,      )

      if isinstance(snake_case       ,      snake_case   ):
         a__						:    Union[str, Any]   		=	[files]
      self._tokenizer.train(snake_case       ,      trainer=snake_case   )

      self.add_unk_id()





   def 						_snake_case			(			self       ,      snake_case       ,      snake_case = 8_000       ,      snake_case = True       ,      )					->	List[str]:
      """simple docstring"""





      a__						:    str   		=	trainers.UnigramTrainer(
          vocab_size=snake_case       ,      special_tokens=self.special_tokens_list       ,      show_progress=snake_case       ,      )

      self._tokenizer.train_from_iterator(snake_case       ,      trainer=snake_case   )

      self.add_unk_id()





   def 						_snake_case			(			self   )					->	Optional[int]:
      """simple docstring"""





      a__						:    Tuple   		=	json.loads(self._tokenizer.to_str()   )

      a__						:    Optional[Any]   		=	self.special_tokens["unk"]["id"]

      a__						:    int   		=	Tokenizer.from_str(json.dumps(snake_case   )   )








def    _A	(   lowerCamelCase ):
   a__						:    Optional[Any]   		=	1
   for i in range(1				,			num + 1 ):
      fact *= i
   return fact






def    _A	(   lowerCamelCase ):
   a__						:    List[Any]   		=	0
   while number > 0:
      a__						:    str   		=	number % 10
      sum_of_digits += last_digit
      a__						:    Dict   		=	number // 10  # Removing the last_digit from the given number
   return sum_of_digits






def    _A	(   lowerCamelCase = 100 ):
   a__						:    Any   		=	factorial(lowerCamelCase )
   a__						:    Optional[Any]   		=	split_and_add(lowerCamelCase )
   return result


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

