



'''simple docstring'''

import warnings
from contextlib import contextmanager

from ...processing_utils import ProcessorMixin



class 		lowerCamelCase__   (    A  ):




					'''simple docstring'''



					A_         =    """AutoFeatureExtractor"""
					A_         =    """Speech2Text2Tokenizer"""




					def __init__(	self					:						Union[str, Any]  ,	UpperCamelCase_					:						List[str]  ,	UpperCamelCase_					:						Any       )	->							Optional[int]:



						'''simple docstring'''





						super().__init__(UpperCamelCase_  ,	UpperCamelCase_       )
						_lowercase       :							List[Any]  	=		self.feature_extractor
						_lowercase       :							Optional[Any]  	=		False




					def __call__(	self					:						int  ,	*UpperCamelCase_					:						Any  ,	**UpperCamelCase_					:						Any       )	->							List[str]:



						'''simple docstring'''





						if self._in_target_context_manager:
							return self.current_processor(*UpperCamelCase_  ,	**UpperCamelCase_       )

						if "raw_speech" in kwargs:
							warnings.warn('Using `raw_speech` as a keyword argument is deprecated. Use `audio` instead.'       )
							_lowercase       :							str  	=		kwargs.pop('raw_speech'       )
						else:
							_lowercase       :							Optional[Any]  	=		kwargs.pop('audio'  ,	UpperCamelCase_       )
						_lowercase       :							str  	=		kwargs.pop('sampling_rate'  ,	UpperCamelCase_       )
						_lowercase       :							Optional[int]  	=		kwargs.pop('text'  ,	UpperCamelCase_       )
						if len(UpperCamelCase_       ) > 0:
							_lowercase       :							Optional[int]  	=		args[0]
							_lowercase       :							List[str]  	=		args[1:]

						if audio is None and text is None:
							raise ValueError('You need to specify either an `audio` or `text` input to process.'       )

						if audio is not None:
							_lowercase       :							List[str]  	=		self.feature_extractor(UpperCamelCase_  ,	*UpperCamelCase_  ,	sampling_rate=UpperCamelCase_  ,	**UpperCamelCase_       )
						if text is not None:
							_lowercase       :							Optional[Any]  	=		self.tokenizer(UpperCamelCase_  ,	**UpperCamelCase_       )

						if text is None:
							return inputs
						elif audio is None:
							return encodings
						else:
							_lowercase       :							List[Any]  	=		encodings['input_ids']
							return inputs




					def     __UpperCAmelCase  (	self					:						Optional[int]  ,	*UpperCamelCase_					:						str  ,	**UpperCamelCase_					:						int       )	->							List[str]:



						'''simple docstring'''





						return self.tokenizer.batch_decode(*UpperCamelCase_  ,	**UpperCamelCase_       )




					def     __UpperCAmelCase  (	self					:						Dict  ,	*UpperCamelCase_					:						Any  ,	**UpperCamelCase_					:						Optional[Any]       )	->							Dict:



						'''simple docstring'''





						return self.tokenizer.decode(*UpperCamelCase_  ,	**UpperCamelCase_       )




					@contextmanager
					def     __UpperCAmelCase  (	self					:						str       )	->							Tuple:



						'''simple docstring'''





						warnings.warn(
						    '`as_target_processor` is deprecated and will be removed in v5 of Transformers. You can process your '
						    'labels by using the argument `text` of the regular `__call__` method (either in the same call as '
						    'your audio inputs, or in a separate call.'       )
						_lowercase       :							str  	=		True
						_lowercase       :							str  	=		self.tokenizer
						yield
						_lowercase       :							Optional[Any]  	=		self.feature_extractor
						_lowercase       :							Optional[Any]  	=		False





'''simple docstring'''

def     __UpperCamelCase					(				_lowercase = 1000       )			->      int:
	_lowercase       :							Optional[int]  	=		[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[Any]  	=		[0, 0, 6, 6, 5, 5, 5, 7, 6, 6]

	_lowercase       :							Any  	=		0

	for i in range(1,					n + 1       ):
		if i < 1000:
			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 // 1000] + 8
	return count


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