

import copy

from ...configuration_utils import PretrainedConfig
from ...utils import logging
from ..auto.configuration_auto import AutoConfig
from ..clip.configuration_clip import CLIPVisionConfig


_a 	=       logging.get_logger(__name__)






class 							A_			(		_lowerCamelCase ):
     _lowercase      :					Dict       =     'vision-text-dual-encoder'
     _lowercase      :					Any       =     True


     def __init__(							self      :		List[str]      ,  UpperCAmelCase      :		Optional[Any]=5_1_2      ,  UpperCAmelCase      :		str=2.6592      ,  **UpperCAmelCase      :		Optional[int] )							->     Optional[Any]:
      super().__init__(**__UpperCamelCase )

      if "vision_config" not in kwargs:
       raise ValueError('`vision_config` can not be `None`.' )

      if "text_config" not in kwargs:
       raise ValueError('`text_config` can not be `None`.' )

      __lowerCAmelCase:       Optional[int]            =				kwargs.pop('vision_config' )
      __lowerCAmelCase:       List[Any]            =				kwargs.pop('text_config' )

      __lowerCAmelCase:       List[str]            =				vision_config.pop('model_type' )
      __lowerCAmelCase:       str            =				text_config.pop('model_type' )

      if vision_model_type == "clip":
       __lowerCAmelCase:       List[str]            =				AutoConfig.for_model(__UpperCamelCase      ,  **__UpperCamelCase ).vision_config
      elif vision_model_type == "clip_vision_model":
       __lowerCAmelCase:       List[Any]            =				CLIPVisionConfig(**__UpperCamelCase )
      else:
       __lowerCAmelCase:       Optional[int]            =				AutoConfig.for_model(__UpperCamelCase      ,  **__UpperCamelCase )

      __lowerCAmelCase:       Tuple            =				AutoConfig.for_model(__UpperCamelCase      ,  **__UpperCamelCase )

      __lowerCAmelCase:       Tuple            =				projection_dim
      __lowerCAmelCase:       int            =				logit_scale_init_value


     @classmethod
     def   UpperCAmelCase  (							cls      :		List[Any]      ,  UpperCAmelCase      :		Any      ,  UpperCAmelCase      :		str      ,  **UpperCAmelCase      :		Optional[Any] )							->     Any:
      return cls(vision_config=vision_config.to_dict()      ,  text_config=text_config.to_dict()      ,  **__UpperCamelCase )


     def   UpperCAmelCase  (							self      :		List[Any] )							->     List[Any]:
      __lowerCAmelCase:       Optional[int]            =				copy.deepcopy(self.__dict__ )
      __lowerCAmelCase:       Tuple            =				self.vision_config.to_dict()
      __lowerCAmelCase:       Any            =				self.text_config.to_dict()
      __lowerCAmelCase:       Dict            =				self.__class__.model_type
      return output








def _a			(	SCREAMING_SNAKE_CASE		:      int = 10_00		)   ->   int:

 """simple docstring"""






 __lowerCAmelCase:       Union[str, 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)
 __lowerCAmelCase:       Union[str, Any]            =				[0, 0, 6, 6, 5, 5, 5, 7, 6, 6]

 __lowerCAmelCase:       Optional[int]            =				0

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

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

   if 0 < i % 1_00 < 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 % 1_00]
   else:
    # add number of letters for twenty, twenty one, ..., ninety
    # nine
    count += ones_counts[i % 10]
    count += tens_counts[(i % 1_00 - i % 10) // 10]
  else:
   count += ones_counts[i // 10_00] + 8
 return count


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





