from ..models.whisper import WhisperForConditionalGeneration, WhisperProcessor
from .base import PipelineTool





class 					A							(    UpperCAmelCase_					):
   __UpperCAmelCase			:			Dict              =      'openai/whisper-base'
   __UpperCAmelCase			:			Tuple              =      (
       'This is a tool that transcribes an audio into text. It takes an input named `audio` and returns the '
       'transcribed text.'
   )
   __UpperCAmelCase			:			Tuple              =      'transcriber'
   __UpperCAmelCase			:			Optional[Any]              =      WhisperProcessor
   __UpperCAmelCase			:			Dict              =      WhisperForConditionalGeneration

   __UpperCAmelCase			:			List[str]              =      ['audio']
   __UpperCAmelCase			:			List[str]              =      ['text']


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



         return self.pre_processor(lowerCamelCase_	,  return_tensors="pt"		).input_features


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



         return self.model.generate(inputs=lowerCamelCase_		)





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



         return self.pre_processor.batch_decode(lowerCamelCase_	,  skip_special_tokens=lowerCamelCase_		)[0]
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()))))



