
'''simple docstring'''







from __future__ import annotations

import sys







def   lowerCAmelCase(  a__    :  List[Any]      ):







       '''simple docstring'''






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







def   lowerCAmelCase(  a__    :  int      ):







       '''simple docstring'''






       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
       lowerCamelCase__				   =      _fib(n // 2      )
       lowerCamelCase__				   =      a * (b * 2 - a)
       lowerCamelCase__				   =      a * a + b * b
       return (d, c + d) if n % 2 else (c, d)


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



import math
from decimal import Decimal, getcontext
def 					lowerCAmelCase__     (    SCREAMING_SNAKE_CASE_ = 4_000_000	)							->						int:

			try:
						lowerCAmelCase__ : str   =						int(SCREAMING_SNAKE_CASE_	)
			except (TypeError, ValueError):
						raise TypeError('Parameter n must be int or castable to int.'	)
			if n <= 0:
						raise ValueError('Parameter n must be greater than or equal to one.'	)
			lowerCAmelCase__ : Union[str, Any]   =						100
			lowerCAmelCase__ : List[Any]   =						(Decimal(5	) ** Decimal(0.5	) + 1) / Decimal(2	)

			lowerCAmelCase__ : Tuple   =						(math.floor(math.log(n * (phi + 2)			,				SCREAMING_SNAKE_CASE_	) - 1	) // 3) * 3 + 2
			lowerCAmelCase__ : Optional[int]   =						Decimal(round(phi ** Decimal(index + 1	)	)	) / (phi + 2)
			lowerCAmelCase__ : Tuple   =						num // 2
			return int(SCREAMING_SNAKE_CASE_	)


if __name__ == "__main__":
					print(F"""{solution() = }""")