


from __future__ import annotations

import sys







def   A   (		A__ ):
     if n < 0:
          raise ValueError("Negative arguments are not supported" )
     return _fib(A__ )[0]







def   A   (		A__ ):
     if n == 0:  # (F(0), F(1))
          return (0, 1)

     # F(2n) = F(n)[2F(n+1) − F(n)]
     # F(2n+1) = F(n+1)^2+F(n)^2
     UpperCAmelCase  , UpperCAmelCase						:				Tuple		  =			_fib(n // 2 )
     UpperCAmelCase						:				List[str]		  =			a * (b * 2 - a)
     UpperCAmelCase						:				Dict		  =			a * a + b * b
     return (d, c + d) if n % 2 else (c, d)


if __name__ == "__main__":
      _snake_case   = int(sys.argv[1])
      print(f'''fibonacci({n}) is {fibonacci(n)}''')







from cva import destroyAllWindows, imread, imshow, waitKey







def   A   (		A__		,		A__ ):
     UpperCAmelCase  , UpperCAmelCase						:				Optional[Any]		  =			img.shape[0], img.shape[1]

     def to_grayscale(A__		,		A__		,		A__ ):
          return 0.2126 * red + 0.587 * green + 0.114 * blue

     def normalize(A__ ):
          return min(A__		,		2_5_5 )

     for i in range(A__ ):
          for j in range(A__ ):
               UpperCAmelCase						:				Optional[Any]		  =			int(to_grayscale(*img[i][j] ) )
               UpperCAmelCase						:				List[str]		  =			[
                   normalize(A__ ),
                   normalize(greyscale + factor ),
                   normalize(greyscale + 2 * factor ),
               ]

     return img


if __name__ == "__main__":
      # read original image
      _snake_case   = {
          percentage: imread("image_data/lena.jpg", 1) for percentage in (1_0, 2_0, 3_0, 4_0)
      }

      for percentage, img in images.items():
            make_sepia(img, percentage)

      for percentage, img in images.items():
            imshow(f'''Original image with sepia (factor: {percentage})''', img)

      waitKey(0)
      destroyAllWindows()



