




'''simple docstring'''

import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible






class 		a							(  unittest.TestCase	):


				def     A_					(						self       :   List[Any]   ):
									snake_case_		     =							[
									    """safety_checker/pytorch_model.bin""",
									    """safety_checker/model.safetensors""",
									    """vae/diffusion_pytorch_model.bin""",
									    """vae/diffusion_pytorch_model.safetensors""",
									    """text_encoder/pytorch_model.bin""",
									    """text_encoder/model.safetensors""",
									    """unet/diffusion_pytorch_model.bin""",
									    """unet/diffusion_pytorch_model.safetensors""",
									]
									self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_   )   )


				def     A_					(						self       :   Optional[Any]   ):
									snake_case_		     =							[
									    """unet/diffusion_pytorch_model.bin""",
									    """unet/diffusion_pytorch_model.safetensors""",
									]
									self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_   )   )


				def     A_					(						self       :   Optional[int]   ):
									snake_case_		     =							[
									    """safety_checker/pytorch_model.bin""",
									    """safety_checker/model.safetensors""",
									    """vae/diffusion_pytorch_model.bin""",
									    """vae/diffusion_pytorch_model.safetensors""",
									    """text_encoder/pytorch_model.bin""",
									    """text_encoder/model.safetensors""",
									    """unet/diffusion_pytorch_model.bin""",
									    # Removed: 'unet/diffusion_pytorch_model.safetensors',
									]
									self.assertFalse(is_safetensors_compatible(SCREAMING_SNAKE_CASE_   )   )


				def     A_					(						self       :   Any   ):
									snake_case_		     =							[
									    """text_encoder/pytorch_model.bin""",
									    """text_encoder/model.safetensors""",
									]
									self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_   )   )


				def     A_					(						self       :   int   ):
									snake_case_		     =							[
									    """safety_checker/pytorch_model.bin""",
									    """safety_checker/model.safetensors""",
									    """vae/diffusion_pytorch_model.bin""",
									    """vae/diffusion_pytorch_model.safetensors""",
									    """text_encoder/pytorch_model.bin""",
									    # Removed: 'text_encoder/model.safetensors',
									    """unet/diffusion_pytorch_model.bin""",
									    """unet/diffusion_pytorch_model.safetensors""",
									]
									self.assertFalse(is_safetensors_compatible(SCREAMING_SNAKE_CASE_   )   )


				def     A_					(						self       :   List[Any]   ):
									snake_case_		     =							[
									    """safety_checker/pytorch_model.fp16.bin""",
									    """safety_checker/model.fp16.safetensors""",
									    """vae/diffusion_pytorch_model.fp16.bin""",
									    """vae/diffusion_pytorch_model.fp16.safetensors""",
									    """text_encoder/pytorch_model.fp16.bin""",
									    """text_encoder/model.fp16.safetensors""",
									    """unet/diffusion_pytorch_model.fp16.bin""",
									    """unet/diffusion_pytorch_model.fp16.safetensors""",
									]
									snake_case_		     =							"""fp16"""
									self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,							variant=SCREAMING_SNAKE_CASE_   )   )


				def     A_					(						self       :   Optional[int]   ):
									snake_case_		     =							[
									    """unet/diffusion_pytorch_model.fp16.bin""",
									    """unet/diffusion_pytorch_model.fp16.safetensors""",
									]
									snake_case_		     =							"""fp16"""
									self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,							variant=SCREAMING_SNAKE_CASE_   )   )


				def     A_					(						self       :   Any   ):
									# pass variant but use the non-variant filenames
									snake_case_		     =							[
									    """unet/diffusion_pytorch_model.bin""",
									    """unet/diffusion_pytorch_model.safetensors""",
									]
									snake_case_		     =							"""fp16"""
									self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,							variant=SCREAMING_SNAKE_CASE_   )   )


				def     A_					(						self       :   Optional[Any]   ):
									snake_case_		     =							[
									    """safety_checker/pytorch_model.fp16.bin""",
									    """safety_checker/model.fp16.safetensors""",
									    """vae/diffusion_pytorch_model.fp16.bin""",
									    """vae/diffusion_pytorch_model.fp16.safetensors""",
									    """text_encoder/pytorch_model.fp16.bin""",
									    """text_encoder/model.fp16.safetensors""",
									    """unet/diffusion_pytorch_model.fp16.bin""",
									    # Removed: 'unet/diffusion_pytorch_model.fp16.safetensors',
									]
									snake_case_		     =							"""fp16"""
									self.assertFalse(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,							variant=SCREAMING_SNAKE_CASE_   )   )


				def     A_					(						self       :   Optional[int]   ):
									snake_case_		     =							[
									    """text_encoder/pytorch_model.fp16.bin""",
									    """text_encoder/model.fp16.safetensors""",
									]
									snake_case_		     =							"""fp16"""
									self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,							variant=SCREAMING_SNAKE_CASE_   )   )


				def     A_					(						self       :   Union[str, Any]   ):
									# pass variant but use the non-variant filenames
									snake_case_		     =							[
									    """text_encoder/pytorch_model.bin""",
									    """text_encoder/model.safetensors""",
									]
									snake_case_		     =							"""fp16"""
									self.assertTrue(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,							variant=SCREAMING_SNAKE_CASE_   )   )


				def     A_					(						self       :   Optional[Any]   ):
									snake_case_		     =							[
									    """safety_checker/pytorch_model.fp16.bin""",
									    """safety_checker/model.fp16.safetensors""",
									    """vae/diffusion_pytorch_model.fp16.bin""",
									    """vae/diffusion_pytorch_model.fp16.safetensors""",
									    """text_encoder/pytorch_model.fp16.bin""",
									    # 'text_encoder/model.fp16.safetensors',
									    """unet/diffusion_pytorch_model.fp16.bin""",
									    """unet/diffusion_pytorch_model.fp16.safetensors""",
									]
									snake_case_		     =							"""fp16"""
									self.assertFalse(is_safetensors_compatible(SCREAMING_SNAKE_CASE_			,							variant=SCREAMING_SNAKE_CASE_   )   )






from __future__ import annotations







def  lowerCAmelCase_	(lowerCAmelCase__:		int | str  ):





			"""simple docstring"""


			UpperCAmelCase_:		Optional[int]							      =     str(lowerCAmelCase__  )
			return n == n[::-1]







def  lowerCAmelCase_	(lowerCAmelCase__:		int = 1_0_0_0_0_0_0  ):





			"""simple docstring"""


			UpperCAmelCase_:		int							      =     0

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


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






