import warnings

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





class 					A							(    UpperCAmelCase_					):
   __UpperCAmelCase			:			int              =      ['image_processor', 'tokenizer']
   __UpperCAmelCase			:			Tuple              =      'ViTImageProcessor'
   __UpperCAmelCase			:			Dict              =      ('CLIPTokenizer', 'CLIPTokenizerFast')


   def __init__(self					:						str	,  __UpperCAmelCase					:						Optional[Any]=None	,  __UpperCAmelCase					:						Any=None	,  **__UpperCAmelCase					:						Any		)						->    Optional[int]:
         """simple docstring"""



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

         UpperCAmelCase__								=  image_processor if image_processor is not None else feature_extractor
         if image_processor is None:
               raise ValueError("You need to specify an `image_processor`."		)
         if tokenizer is None:
               raise ValueError("You need to specify a `tokenizer`."		)

         super().__init__(__UpperCAmelCase	,  __UpperCAmelCase		)


   def __call__(self					:						List[str]	,  __UpperCAmelCase					:						List[Any]=None	,  __UpperCAmelCase					:						List[Any]=None	,  __UpperCAmelCase					:						Dict=None	,  __UpperCAmelCase					:						Optional[int]=None	,  **__UpperCAmelCase					:						Optional[Any]		)						->    Optional[Any]:
         """simple docstring"""



         if text is None and visual_prompt is None and images is None:
               raise ValueError("You have to specify either text, visual prompt or images."		)

         if text is not None and visual_prompt is not None:
               raise ValueError("You have to specify exactly one type of prompt. Either text or visual prompt."		)

         if text is not None:
               UpperCAmelCase__								=  self.tokenizer(__UpperCAmelCase	,  return_tensors=__UpperCAmelCase	,  **__UpperCAmelCase		)

         if visual_prompt is not None:
               UpperCAmelCase__								=  self.image_processor(__UpperCAmelCase	,  return_tensors=__UpperCAmelCase	,  **__UpperCAmelCase		)

         if images is not None:
               UpperCAmelCase__								=  self.image_processor(__UpperCAmelCase	,  return_tensors=__UpperCAmelCase	,  **__UpperCAmelCase		)

         if visual_prompt is not None and images is not None:
               UpperCAmelCase__								=  {
                   "pixel_values": image_features.pixel_values,
                   "conditional_pixel_values": prompt_features.pixel_values,
               }
               return encoding
         elif text is not None and images is not None:
               UpperCAmelCase__								=  image_features.pixel_values
               return encoding
         elif text is not None:
               return encoding
         elif visual_prompt is not None:
               UpperCAmelCase__								=  {
                   "conditional_pixel_values": prompt_features.pixel_values,
               }
               return encoding
         else:
               return BatchEncoding(data=dict(**__UpperCAmelCase		)	,  tensor_type=__UpperCAmelCase		)


   def       lowercase_				(self					:						List[str]	,  *__UpperCAmelCase					:						Tuple	,  **__UpperCAmelCase					:						str		)						->    Dict:
         """simple docstring"""



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


   def       lowercase_				(self					:						List[Any]	,  *__UpperCAmelCase					:						Optional[Any]	,  **__UpperCAmelCase					:						Any		)						->    List[str]:
         """simple docstring"""



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


   @property
   def       lowercase_				(self					:						Tuple		)						->    List[Any]:
         """simple docstring"""



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





   @property
   def       lowercase_				(self					:						Optional[Any]		)						->    Dict:
         """simple docstring"""



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




from __future__ import annotations




def        lowerCAmelCase_			(					__A							)					->    bool:







      '''simple docstring'''


      UpperCAmelCase__								=  str(__A							)
      return n == n[::-1]




def        lowerCAmelCase_			(					__A = 1_000_000							)					->    Optional[int]:







      '''simple docstring'''


      UpperCAmelCase__								=  0

      for i in range(1,  __A							):
            if is_palindrome(__A							) and is_palindrome(bin(__A							).split("b"							)[1]							):
                  total += i
      return total


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



