






from functools import lru_cache

@lru_cache
def    lowerCAmelCase__		(			_a				:	Optional[int]			):
		if not isinstance(SCREAMING_SNAKE_CASE_     ,					SCREAMING_SNAKE_CASE_			):
				raise TypeError("k must be an integer."			)
		if k < 0:
				raise ValueError("k integer must be greater or equal to zero."			)
		if k == 0:
				return 0
		elif k == 1:
				return 1
		else:
				return fibonacci(k - 1			) + fibonacci(k - 2			)

def    lowerCAmelCase__		(			_a				:	Union[str, Any]     ,					_a				:	List[str]			):
		snake_case_ :							Union[str, Any]         =				len(SCREAMING_SNAKE_CASE_			)
		# Find m such that F_m >= n where F_i is the i_th fibonacci number.
		snake_case_ :							Tuple         =				0
		while True:
				if fibonacci(SCREAMING_SNAKE_CASE_			) >= len_list:
						snake_case_ :							Union[str, Any]         =				i
						break
				i += 1
		snake_case_ :							Union[str, Any]         =				0
		while fibb_k > 0:
				snake_case_ :							Any         =				min(
				    offset + fibonacci(fibb_k - 1			)     ,					len_list - 1			)  # Prevent out of range
				snake_case_ :							int         =				arr[index_k]
				if item_k_1 == val:
						return index_k
				elif val < item_k_1:
						fibb_k -= 1
				elif val > item_k_1:
						offset += fibonacci(fibb_k - 1			)
						fibb_k -= 2
		else:
				return -1


if __name__ == "__main__":
							import doctest

							doctest.testmod()


"""simple docstring"""




snake_case    =		1_0_0_0

def   UpperCamelCase_  (		SCREAMING_SNAKE_CASE_			):
					return x * x

def   UpperCamelCase_  (		SCREAMING_SNAKE_CASE_,     SCREAMING_SNAKE_CASE_,     SCREAMING_SNAKE_CASE_,     SCREAMING_SNAKE_CASE_ = 4			):
					assert callable(
					    SCREAMING_SNAKE_CASE_			), f'''the function(object) passed should be callable your input : {function}'''
					assert isinstance(SCREAMING_SNAKE_CASE_,     (float, int)			), f'''a should be float or integer your input : {a}'''
					assert isinstance(function(SCREAMING_SNAKE_CASE_			),     (float, int)			), (
					    "the function should return integer or float return type of your function, "
					    f'''{type(SCREAMING_SNAKE_CASE_			)}'''
					)
					assert isinstance(SCREAMING_SNAKE_CASE_,     (float, int)			), f'''b should be float or integer your input : {b}'''
					assert (
					    isinstance(SCREAMING_SNAKE_CASE_,     SCREAMING_SNAKE_CASE_			) and precision > 0
					), f'''precision should be positive integer your input : {precision}'''

					# just applying the formula of simpson for approximate integration written in
					# mentioned article in first comment of this file and above this function

					SCREAMING_SNAKE_CASE				=	(b - a) / N_STEPS
					SCREAMING_SNAKE_CASE				=	function(SCREAMING_SNAKE_CASE_			) + function(SCREAMING_SNAKE_CASE_			)

					for i in range(1,     SCREAMING_SNAKE_CASE_			):
										SCREAMING_SNAKE_CASE				=	a + h * i
										result += function(SCREAMING_SNAKE_CASE_			) * (4 if i % 2 else 2)

					result *= h / 3
					return round(SCREAMING_SNAKE_CASE_,     SCREAMING_SNAKE_CASE_			)


if __name__ == "__main__":
	import doctest

	doctest.testmod()
