





'''simple docstring'''




import os
from shutil import copyfile
from typing import List, Optional, Tuple

from ...tokenization_utils import AddedToken
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import is_sentencepiece_available, logging


if is_sentencepiece_available():
  from .tokenization_fnet import FNetTokenizer
else:
  lowercase__    :      List[Any]						=    None

lowercase__    :      int						=    logging.get_logger(__name__)
lowercase__    :      Optional[int]						=    {"vocab_file": "spiece.model", "tokenizer_file": "tokenizer.json"}

lowercase__    :      Optional[int]						=    {
    "vocab_file": {
        "google/fnet-base": "https://huggingface.co/google/fnet-base/resolve/main/spiece.model",
        "google/fnet-large": "https://huggingface.co/google/fnet-large/resolve/main/spiece.model",
    },
    "tokenizer_file": {
        "google/fnet-base": "https://huggingface.co/google/fnet-base/resolve/main/tokenizer.json",
        "google/fnet-large": "https://huggingface.co/google/fnet-large/resolve/main/tokenizer.json",
    },
}

lowercase__    :      List[Any]						=    {
    "google/fnet-base": 5_12,
    "google/fnet-large": 5_12,
}

lowercase__    :      Any						=    "▁"


class  SCREAMING_SNAKE_CASE    (a__							):
     lowerCAmelCase					=       VOCAB_FILES_NAMES
     lowerCAmelCase					=       PRETRAINED_VOCAB_FILES_MAP
     lowerCAmelCase					=       PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
     lowerCAmelCase					=       ['''input_ids''', '''token_type_ids''']
     lowerCAmelCase					=       FNetTokenizer


     def __init__(						self						,	_UpperCAmelCase=None						,	_UpperCAmelCase=None						,	_UpperCAmelCase=False						,	_UpperCAmelCase=True						,	_UpperCAmelCase=True						,	_UpperCAmelCase="<unk>"						,	_UpperCAmelCase="[SEP]"						,	_UpperCAmelCase="<pad>"						,	_UpperCAmelCase="[CLS]"						,	_UpperCAmelCase="[MASK]"						,	**_UpperCAmelCase						,	):

          '''simple docstring'''






          __A						: List[Any]      =       (
              AddedToken(A_						,	lstrip=A_						,	rstrip=A_						,	normalized=A_)
              if isinstance(A_						,	A_)
              else mask_token
          )

          super().__init__(
              A_						,	tokenizer_file=A_						,	do_lower_case=A_						,	remove_space=A_						,	keep_accents=A_						,	unk_token=A_						,	sep_token=A_						,	pad_token=A_						,	cls_token=A_						,	mask_token=A_						,	**A_						,	)

          __A						: Tuple      =       do_lower_case
          __A						: Optional[Any]      =       remove_space
          __A						: Union[str, Any]      =       keep_accents
          __A						: Optional[int]      =       vocab_file
          __A						: str      =       False if not self.vocab_file else True


     def 							SCREAMING_SNAKE_CASE  (						self						,	_UpperCAmelCase						,	_UpperCAmelCase = None):

          '''simple docstring'''






          __A						: Any      =       [self.sep_token_id]
          __A						: Union[str, Any]      =       [self.cls_token_id]
          if token_ids_a is None:
               return cls + token_ids_a + sep
          return cls + token_ids_a + sep + token_ids_a + sep


     def 							SCREAMING_SNAKE_CASE  (						self						,	_UpperCAmelCase						,	_UpperCAmelCase = None):

          '''simple docstring'''






          __A						: Tuple      =       [self.sep_token_id]
          __A						: Optional[Any]      =       [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) * [0] + len(token_ids_a + sep) * [1]


     def 							SCREAMING_SNAKE_CASE  (						self						,	_UpperCAmelCase						,	_UpperCAmelCase = None):

          '''simple docstring'''






          if not os.path.isdir(A_):
               logger.error(F'Vocabulary path ({save_directory}) should be a directory')
               return
          __A						: str      =       os.path.join(
              A_						,	(filename_prefix + '-' if filename_prefix else '') + VOCAB_FILES_NAMES['vocab_file'])

          if os.path.abspath(self.vocab_file) != os.path.abspath(A_):
               copyfile(self.vocab_file						,	A_)

          return (out_vocab_file,)





def 			_SCREAMING_SNAKE_CASE			(							lowercase	:       int = 10_00     ):


      '''simple docstring'''



      lowerCamelCase_		     =    2**power
      lowerCamelCase_		     =    0
      while n:
            lowerCamelCase_     ,				lowerCamelCase_		     =    r + n % 10, n // 10
      return r


if __name__ == "__main__":
 print(solution(int(str(input()).strip())))



