





import warnings

from ...processing_utils import ProcessorMixin
from ...tokenization_utils_base import BatchEncoding





class UpperCAmelCase_							(   _SCREAMING_SNAKE_CASE   ):
  __lowerCAmelCase      :	Optional[Any]  	=      ["""image_processor""", """tokenizer"""]
  __lowerCAmelCase      :	Union[str, Any]  	=      """AutoImageProcessor"""
  __lowerCAmelCase      :	Any  	=      """AutoTokenizer"""


  def __init__(       self   ,__snake_case=None   ,__snake_case=None   ,**__snake_case   ):



       """simple docstring"""





       A_					      =					None
       if "feature_extractor" in kwargs:
            warnings.warn(
                '''The `feature_extractor` argument is deprecated and will be removed in v5, use `image_processor`'''
                ''' instead.'''   ,__snake_case   ,)
            A_					      =					kwargs.pop('''feature_extractor'''   )

       A_					      =					image_processor if image_processor is not None else feature_extractor
       if image_processor is None:
            raise ValueError('''You have to specify an image_processor.'''   )
       if tokenizer is None:
            raise ValueError('''You have to specify a tokenizer.'''   )

       super().__init__(__snake_case   ,__snake_case   )
       A_					      =					self.image_processor


  def __call__(       self   ,__snake_case=None   ,__snake_case=None   ,__snake_case=None   ,**__snake_case   ):



       """simple docstring"""





       if text is None and images is None:
            raise ValueError('''You have to specify either text or images. Both cannot be none.'''   )

       if text is not None:
            A_					      =					self.tokenizer(__snake_case   ,return_tensors=__snake_case   ,**__snake_case   )

       if images is not None:
            A_					      =					self.image_processor(__snake_case   ,return_tensors=__snake_case   ,**__snake_case   )

       if text is not None and images is not None:
            A_					      =					image_features.pixel_values
            return encoding
       elif text is not None:
            return encoding
       else:
            return BatchEncoding(data=dict(**__snake_case   )   ,tensor_type=__snake_case   )


  def 	__UpperCAmelCase    (       self   ,*__snake_case   ,**__snake_case   ):



       """simple docstring"""





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


  def 	__UpperCAmelCase    (       self   ,*__snake_case   ,**__snake_case   ):



       """simple docstring"""





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


  @property
  def 	__UpperCAmelCase    (       self   ):



       """simple docstring"""





       A_					      =					self.tokenizer.model_input_names
       A_					      =					self.image_processor.model_input_names
       return list(dict.fromkeys(tokenizer_input_names + image_processor_input_names   )   )


  @property
  def 	__UpperCAmelCase    (       self   ):



       """simple docstring"""





       warnings.warn(
           '''`feature_extractor_class` is deprecated and will be removed in v5. Use `image_processor_class` instead.'''   ,__snake_case   ,)
       return self.image_processor_class




  @property
  def 	__UpperCAmelCase    (       self   ):



       """simple docstring"""





       warnings.warn(
           '''`feature_extractor` is deprecated and will be removed in v5. Use `image_processor` instead.'''   ,__snake_case   ,)
       return self.image_processor










def     UpperCAmelCase_						(						_UpperCAmelCase       :int = 1000							)  ->							int:
     '''simple docstring'''


     A_					      =					[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)
     A_					      =					[0, 0, 6, 6, 5, 5, 5, 7, 6, 6]

     A_					      =					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())))



