

import unittest

from diffusers.pipelines.pipeline_utils import is_safetensors_compatible







class        a__       (   unittest.TestCase       ):







  """simple docstring"""




  def  _lowercase      (			self    : Union[str, Any]		)					->Dict:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      Optional[Any]       =   [
            """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(UpperCAmelCase__		)		)


  def  _lowercase      (			self    : str		)					->Optional[int]:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      Union[str, Any]       =   [
            """unet/diffusion_pytorch_model.bin""",
            """unet/diffusion_pytorch_model.safetensors""",
        ]
        self.assertTrue(is_safetensors_compatible(UpperCAmelCase__		)		)


  def  _lowercase      (			self    : Dict		)					->List[str]:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      Any       =   [
            """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(UpperCAmelCase__		)		)


  def  _lowercase      (			self    : Optional[Any]		)					->Any:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      Optional[int]       =   [
            """text_encoder/pytorch_model.bin""",
            """text_encoder/model.safetensors""",
        ]
        self.assertTrue(is_safetensors_compatible(UpperCAmelCase__		)		)


  def  _lowercase      (			self    : List[Any]		)					->Optional[Any]:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      int       =   [
            """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(UpperCAmelCase__		)		)


  def  _lowercase      (			self    : Optional[int]		)					->Any:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      List[Any]       =   [
            """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""",
        ]
        SCREAMING_SNAKE_CASE :      Union[str, Any]       =   """fp16"""
        self.assertTrue(is_safetensors_compatible(UpperCAmelCase__				,				variant=UpperCAmelCase__		)		)


  def  _lowercase      (			self    : Optional[Any]		)					->Union[str, Any]:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      int       =   [
            """unet/diffusion_pytorch_model.fp16.bin""",
            """unet/diffusion_pytorch_model.fp16.safetensors""",
        ]
        SCREAMING_SNAKE_CASE :      List[Any]       =   """fp16"""
        self.assertTrue(is_safetensors_compatible(UpperCAmelCase__				,				variant=UpperCAmelCase__		)		)


  def  _lowercase      (			self    : Optional[Any]		)					->Dict:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      Optional[int]       =   [
            """unet/diffusion_pytorch_model.bin""",
            """unet/diffusion_pytorch_model.safetensors""",
        ]
        SCREAMING_SNAKE_CASE :      str       =   """fp16"""
        self.assertTrue(is_safetensors_compatible(UpperCAmelCase__				,				variant=UpperCAmelCase__		)		)


  def  _lowercase      (			self    : int		)					->int:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      Tuple       =   [
            """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',
        ]
        SCREAMING_SNAKE_CASE :      Tuple       =   """fp16"""
        self.assertFalse(is_safetensors_compatible(UpperCAmelCase__				,				variant=UpperCAmelCase__		)		)


  def  _lowercase      (			self    : int		)					->Optional[int]:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      str       =   [
            """text_encoder/pytorch_model.fp16.bin""",
            """text_encoder/model.fp16.safetensors""",
        ]
        SCREAMING_SNAKE_CASE :      Optional[Any]       =   """fp16"""
        self.assertTrue(is_safetensors_compatible(UpperCAmelCase__				,				variant=UpperCAmelCase__		)		)


  def  _lowercase      (			self    : Union[str, Any]		)					->Dict:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      Optional[int]       =   [
            """text_encoder/pytorch_model.bin""",
            """text_encoder/model.safetensors""",
        ]
        SCREAMING_SNAKE_CASE :      str       =   """fp16"""
        self.assertTrue(is_safetensors_compatible(UpperCAmelCase__				,				variant=UpperCAmelCase__		)		)




  def  _lowercase      (			self    : int		)					->List[Any]:
        """simple docstring"""







        SCREAMING_SNAKE_CASE :      Optional[int]       =   [
            """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""",
        ]
        SCREAMING_SNAKE_CASE :      str       =   """fp16"""
        self.assertFalse(is_safetensors_compatible(UpperCAmelCase__				,				variant=UpperCAmelCase__		)		)







from math import ceil






def 					__lowercase      (     _A = 1001			)     ->						int:
      SCREAMING_SNAKE_CASE :      Union[str, Any]       =   1

      for i in range(1						,    int(ceil(n / 2.0			)			)			):
            SCREAMING_SNAKE_CASE :      Dict       =   2 * i + 1
            SCREAMING_SNAKE_CASE :      Optional[int]       =   2 * i
            SCREAMING_SNAKE_CASE :      str       =   total + 4 * odd**2 - 6 * even

      return total


if __name__ == "__main__":
  import sys

  if len(sys.argv) == 1:
    print(solution())
  else:
    try:
      UpperCAmelCase__ :     str				    =    int(sys.argv[1])
      print(solution(n))
    except ValueError:
      print("""Invalid entry - please enter a number""")




