






'''simple docstring'''
import os
from shutil import copyfile
from typing import Any, Dict, List, Optional, Tuple

import sentencepiece as spm

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


a_					=	logging.get_logger(__name__)

a_					=	'▁'

a_					=	{'vocab_file': 'sentencepiece.bpe.model'}

a_					=	{
    'vocab_file': {
        'xlm-roberta-base': 'https://huggingface.co/xlm-roberta-base/resolve/main/sentencepiece.bpe.model',
        'xlm-roberta-large': 'https://huggingface.co/xlm-roberta-large/resolve/main/sentencepiece.bpe.model',
        'xlm-roberta-large-finetuned-conll02-dutch': (
            'https://huggingface.co/xlm-roberta-large-finetuned-conll02-dutch/resolve/main/sentencepiece.bpe.model'
        ),
        'xlm-roberta-large-finetuned-conll02-spanish': (
            'https://huggingface.co/xlm-roberta-large-finetuned-conll02-spanish/resolve/main/sentencepiece.bpe.model'
        ),
        'xlm-roberta-large-finetuned-conll03-english': (
            'https://huggingface.co/xlm-roberta-large-finetuned-conll03-english/resolve/main/sentencepiece.bpe.model'
        ),
        'xlm-roberta-large-finetuned-conll03-german': (
            'https://huggingface.co/xlm-roberta-large-finetuned-conll03-german/resolve/main/sentencepiece.bpe.model'
        ),
    }
}

a_					=	{
    'xlm-roberta-base': 5_1_2,
    'xlm-roberta-large': 5_1_2,
    'xlm-roberta-large-finetuned-conll02-dutch': 5_1_2,
    'xlm-roberta-large-finetuned-conll02-spanish': 5_1_2,
    'xlm-roberta-large-finetuned-conll03-english': 5_1_2,
    'xlm-roberta-large-finetuned-conll03-german': 5_1_2,
}






class        __SCREAMING_SNAKE_CASE (     lowerCamelCase			):
 snake_case_												=							VOCAB_FILES_NAMES
 snake_case_												=							PRETRAINED_VOCAB_FILES_MAP
 snake_case_												=							PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
 snake_case_												=							["""input_ids""", """attention_mask"""]




 def __init__( self		:							str   , __lowercase		:							int   , __lowercase		:							int="<s>"   , __lowercase		:							Tuple="</s>"   , __lowercase		:							int="</s>"   , __lowercase		:							Tuple="<s>"   , __lowercase		:							int="<unk>"   , __lowercase		:							Dict="<pad>"   , __lowercase		:							Any="<mask>"   , __lowercase		:							Optional[Dict[str, Any]] = None   , **__lowercase		:							Optional[Any]   , )		->  None:
       # Mask token behave like a normal word, i.e. include the space before it
       SCREAMING_SNAKE_CASE__       :			int													=AddedToken(__lowercase   , lstrip=__lowercase   , rstrip=__lowercase ) if isinstance(__lowercase   , __lowercase ) else mask_token

       SCREAMING_SNAKE_CASE__       :			List[str]													={} if sp_model_kwargs is None else sp_model_kwargs

       super().__init__(
           bos_token=__lowercase   , eos_token=__lowercase   , unk_token=__lowercase   , sep_token=__lowercase   , cls_token=__lowercase   , pad_token=__lowercase   , mask_token=__lowercase   , sp_model_kwargs=self.sp_model_kwargs   , **__lowercase   , )

       SCREAMING_SNAKE_CASE__       :			int													=spm.SentencePieceProcessor(**self.sp_model_kwargs )
       self.sp_model.Load(str(__lowercase ) )
       SCREAMING_SNAKE_CASE__       :			str													=vocab_file

       # Original fairseq vocab and spm vocab must be "aligned":
       # Vocab    |    0    |    1    |   2    |    3    |  4  |  5  |  6  |   7   |   8   |  9
       # -------- | ------- | ------- | ------ | ------- | --- | --- | --- | ----- | ----- | ----
       # fairseq  | '<s>'   | '<pad>' | '</s>' | '<unk>' | ',' | '.' | '▁' | 's'   | '▁de' | '-'
       # spm      | '<unk>' | '<s>'   | '</s>' | ','     | '.' | '▁' | 's' | '▁de' | '-'   | '▁a'

       # Mimic fairseq token-to-id alignment for the first 4 token
       SCREAMING_SNAKE_CASE__       :			int													={'''<s>''': 0, '''<pad>''': 1, '''</s>''': 2, '''<unk>''': 3}

       # The first "real" token "," has position 4 in the original fairseq vocab and position 3 in the spm vocab
       SCREAMING_SNAKE_CASE__       :			Optional[int]													=1

       SCREAMING_SNAKE_CASE__       :			Optional[int]													=len(self.sp_model ) + self.fairseq_offset
       SCREAMING_SNAKE_CASE__       :			int													={v: k for k, v in self.fairseq_tokens_to_ids.items()}




 def __getstate__( self		:							Union[str, Any] )		->  str:
       SCREAMING_SNAKE_CASE__       :			str													=self.__dict__.copy()
       SCREAMING_SNAKE_CASE__       :			List[Any]													=None
       SCREAMING_SNAKE_CASE__       :			Union[str, Any]													=self.sp_model.serialized_model_proto()
       return state




 def __setstate__( self		:							List[Any]   , __lowercase		:							str )		->  List[Any]:
       SCREAMING_SNAKE_CASE__       :			Optional[Any]													=d

       # for backward compatibility
       if not hasattr(self   , '''sp_model_kwargs''' ):
             SCREAMING_SNAKE_CASE__       :			Optional[int]													={}

       SCREAMING_SNAKE_CASE__       :			Tuple													=spm.SentencePieceProcessor(**self.sp_model_kwargs )
       self.sp_model.LoadFromSerializedProto(self.sp_model_proto )




 def        __magic_name__		( self		:							List[str]   , __lowercase		:							List[int]   , __lowercase		:							Optional[List[int]] = None )		->  List[int]:

       if token_ids_a is None:
             return [self.cls_token_id] + token_ids_a + [self.sep_token_id]
       SCREAMING_SNAKE_CASE__       :			int													=[self.cls_token_id]
       SCREAMING_SNAKE_CASE__       :			int													=[self.sep_token_id]
       return cls + token_ids_a + sep + sep + token_ids_a + sep




 def        __magic_name__		( self		:							str   , __lowercase		:							List[int]   , __lowercase		:							Optional[List[int]] = None   , __lowercase		:							bool = False )		->  List[int]:

       if already_has_special_tokens:
             return super().get_special_tokens_mask(
                 token_ids_a=__lowercase   , token_ids_a=__lowercase   , already_has_special_tokens=__lowercase )

       if token_ids_a is None:
             return [1] + ([0] * len(__lowercase )) + [1]
       return [1] + ([0] * len(__lowercase )) + [1, 1] + ([0] * len(__lowercase )) + [1]




 def        __magic_name__		( self		:							Optional[Any]   , __lowercase		:							List[int]   , __lowercase		:							Optional[List[int]] = None )		->  List[int]:
       SCREAMING_SNAKE_CASE__       :			List[Any]													=[self.sep_token_id]
       SCREAMING_SNAKE_CASE__       :			int													=[self.cls_token_id]

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




 @property
 def        __magic_name__		( self		:							Tuple )		->  Optional[Any]:
       return len(self.sp_model ) + self.fairseq_offset + 1  # Add the <mask> token




 def        __magic_name__		( self		:							Any )		->  Tuple:
       SCREAMING_SNAKE_CASE__       :			Any													={self.convert_ids_to_tokens(__lowercase ): i for i in range(self.vocab_size )}
       vocab.update(self.added_tokens_encoder )
       return vocab




 def        __magic_name__		( self		:							str   , __lowercase		:							str )		->  List[str]:
       return self.sp_model.encode(__lowercase   , out_type=__lowercase )




 def        __magic_name__		( self		:							int   , __lowercase		:							List[str] )		->  Optional[Any]:
       if token in self.fairseq_tokens_to_ids:
             return self.fairseq_tokens_to_ids[token]
       SCREAMING_SNAKE_CASE__       :			int													=self.sp_model.PieceToId(__lowercase )

       # Need to return unknown token if the SP model returned 0
       return spm_id + self.fairseq_offset if spm_id else self.unk_token_id




 def        __magic_name__		( self		:							Union[str, Any]   , __lowercase		:							Tuple )		->  List[Any]:
       if index in self.fairseq_ids_to_tokens:
             return self.fairseq_ids_to_tokens[index]
       return self.sp_model.IdToPiece(index - self.fairseq_offset )




 def        __magic_name__		( self		:							Union[str, Any]   , __lowercase		:							List[str] )		->  List[Any]:
       SCREAMING_SNAKE_CASE__       :			Optional[Any]													=''''''.join(__lowercase ).replace(__lowercase   , ''' ''' ).strip()
       return out_string




 def        __magic_name__		( self		:							Optional[int]   , __lowercase		:							str   , __lowercase		:							Optional[str] = None )		->  Tuple[str]:
       if not os.path.isdir(__lowercase ):
             logger.error(F"Vocabulary path ({save_directory}) should be a directory" )
             return
       SCREAMING_SNAKE_CASE__       :			Dict													=os.path.join(
           __lowercase   , (filename_prefix + '''-''' if filename_prefix else '''''') + VOCAB_FILES_NAMES['''vocab_file'''] )

       if os.path.abspath(self.vocab_file ) != os.path.abspath(__lowercase ) and os.path.isfile(self.vocab_file ):
             copyfile(self.vocab_file   , __lowercase )
       elif not os.path.isfile(self.vocab_file ):
             with open(__lowercase   , '''wb''' ) as fi:
                   SCREAMING_SNAKE_CASE__       :			Dict													=self.sp_model.serialized_model_proto()
                   fi.write(__lowercase )

       return (out_vocab_file,)







'''simple docstring'''
from math import factorial





def 	_a(					UpperCamelCase__			:  int = 1_0_0							):




      '''simple docstring'''






      return sum(int(UpperCamelCase__							) for x in str(factorial(UpperCamelCase__							)							)							)


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