


"""simple docstring"""


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

from ...file_utils import is_sentencepiece_available
from ...tokenization_utils_fast import PreTrainedTokenizerFast
from ...utils import logging


if is_sentencepiece_available():
		from .tokenization_deberta_va import DebertaVaTokenizer
else:
		a_											=			None

a_											=			logging.get_logger(__name__)

a_											=			{"vocab_file": "spm.model", "tokenizer_file": "tokenizer.json"}

a_											=			{
    "vocab_file": {
        "microsoft/deberta-v2-xlarge": "https://huggingface.co/microsoft/deberta-v2-xlarge/resolve/main/spm.model",
        "microsoft/deberta-v2-xxlarge": "https://huggingface.co/microsoft/deberta-v2-xxlarge/resolve/main/spm.model",
        "microsoft/deberta-v2-xlarge-mnli": (
            "https://huggingface.co/microsoft/deberta-v2-xlarge-mnli/resolve/main/spm.model"
        ),
        "microsoft/deberta-v2-xxlarge-mnli": (
            "https://huggingface.co/microsoft/deberta-v2-xxlarge-mnli/resolve/main/spm.model"
        ),
    }
}

a_											=			{
    "microsoft/deberta-v2-xlarge": 5_12,
    "microsoft/deberta-v2-xxlarge": 5_12,
    "microsoft/deberta-v2-xlarge-mnli": 5_12,
    "microsoft/deberta-v2-xxlarge-mnli": 5_12,
}

a_											=			{
    "microsoft/deberta-v2-xlarge": {"do_lower_case": False},
    "microsoft/deberta-v2-xxlarge": {"do_lower_case": False},
    "microsoft/deberta-v2-xlarge-mnli": {"do_lower_case": False},
    "microsoft/deberta-v2-xxlarge-mnli": {"do_lower_case": False},
}
class snake_case					(     _UpperCamelCase):
		__UpperCamelCase							=	VOCAB_FILES_NAMES
		__UpperCamelCase							=	PRETRAINED_VOCAB_FILES_MAP
		__UpperCamelCase							=	PRETRAINED_INIT_CONFIGURATION
		__UpperCamelCase							=	PRETRAINED_POSITIONAL_EMBEDDINGS_SIZES
		__UpperCamelCase							=	DebertaVaTokenizer







		def __init__(    self					:				List[Any]			,      a__					:				List[Any]=None			,      a__					:				Tuple=None			,      a__					:				Optional[Any]=False			,      a__					:				int=False			,      a__					:				Dict="[CLS]"			,      a__					:				Tuple="[SEP]"			,      a__					:				Optional[int]="[UNK]"			,      a__					:				List[str]="[SEP]"			,      a__					:				List[Any]="[PAD]"			,      a__					:				int="[CLS]"			,      a__					:				str="[MASK]"			,      **a__					:				str			,      )				->  None:





						'''simple docstring'''







						super().__init__(
						    a__			,      tokenizer_file=a__			,      do_lower_case=a__			,      bos_token=a__			,      eos_token=a__			,      unk_token=a__			,      sep_token=a__			,      pad_token=a__			,      cls_token=a__			,      mask_token=a__			,      split_by_punct=a__			,      **a__			,      )

						_A         =	do_lower_case
						_A         =	split_by_punct
						_A         =	vocab_file
						_A         =	False if not self.vocab_file else True







		def        a_       (    self					:				Dict			,      a__					:				Tuple			,      a__					:				List[str]=None						)				->  Tuple:





						'''simple docstring'''







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







		def        a_       (    self					:				Tuple			,      a__					:				List[Any]			,      a__					:				List[Any]=None			,      a__					:				Tuple=False						)				->  str:





						'''simple docstring'''







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

						if token_ids_a is not None:
										return [1] + ([0] * len(a__						)) + [1] + ([0] * len(a__						)) + [1]
						return [1] + ([0] * len(a__						)) + [1]







		def        a_       (    self					:				List[str]			,      a__					:				Union[str, Any]			,      a__					:				Optional[int]=None						)				->  Tuple:





						'''simple docstring'''







						_A         =	[self.sep_token_id]
						_A         =	[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        a_       (    self					:				Tuple			,      a__					:				str			,      a__					:				Optional[str] = None						)				->  Tuple[str]:





						'''simple docstring'''







						if not self.can_save_slow_tokenizer:
										raise ValueError(
										    "Your fast tokenizer does not have the necessary information to save the vocabulary for a slow "
										    "tokenizer."						)

						if not os.path.isdir(a__						):
										logger.error(F"""Vocabulary path ({save_directory}) should be a directory"""						)
										return
						_A         =	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,)







"""simple docstring"""







def 						lowercase__(A = 1_000						)				->int:




						"""simple docstring"""



						lowercase__				:      Any=       [0, 3, 3, 5, 4, 4, 3, 5, 5, 4, 3, 6, 6, 8, 8, 7, 7, 9, 8, 8]
						# number of letters in twenty, thirty, ..., ninety (0 for numbers less than
						# 20 due to inconsistency in teens)
						lowercase__				:      List[str]=       [0, 0, 6, 6, 5, 5, 5, 7, 6, 6]

						lowercase__				:      Dict=       0

						for i in range(1					,		n + 1						):
												if i < 1_000:
																		if i >= 100:
																								# add number of letters for "n hundred"
																								count += ones_counts[i // 100] + 7

																								if i % 100 != 0:
																														# add number of letters for "and" if number is not multiple
																														# of 100
																														count += 3

																		if 0 < i % 100 < 20:
																								# add number of letters for one, two, three, ..., nineteen
																								# (could be combined with below if not for inconsistency in
																								# teens)
																								count += ones_counts[i % 100]
																		else:
																								# add number of letters for twenty, twenty one, ..., ninety
																								# nine
																								count += ones_counts[i % 10]
																								count += tens_counts[(i % 100 - i % 10) // 10]
												else:
																		count += ones_counts[i // 1_000] + 8
						return count


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






