
'''simple docstring'''
from __future__ import annotations




def 					_UpperCamelCase		(    SCREAMING_SNAKE_CASE__       )   ->				int | float:


		'''simple docstring'''


		snake_case   :    Any			       =		sorted(SCREAMING_SNAKE_CASE__       )
		snake_case   :    int			       =		len(SCREAMING_SNAKE_CASE__       )
		snake_case   :    List[str]			       =		length >> 1
		return (
		    (sorted_list[mid_index] + sorted_list[mid_index - 1]) / 2
		    if length % 2 == 0
		    else sorted_list[mid_index]
		)




def 					_UpperCamelCase		(    )   ->				Optional[int]:


		'''simple docstring'''


		import doctest

		doctest.testmod()


if __name__ == "__main__":
						main()








'''simple docstring'''







from functools import lru_cache






@lru_cache
def 		_lowercase		(	lowercase_  ):



		'''simple docstring'''







		if not isinstance(lowercase_						,							lowercase_  ):
				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 		_lowercase		(	lowercase_						,							lowercase_  ):



		'''simple docstring'''







		_snake_case	       =       len(lowercase_  )
		# Find m such that F_m >= n where F_i is the i_th fibonacci number.
		_snake_case	       =       0
		while True:
				if fibonacci(lowercase_  ) >= len_list:
						_snake_case	       =       i
						break
				i += 1
		_snake_case	       =       0
		while fibb_k > 0:
				_snake_case	       =       min(
				    offset + fibonacci(fibb_k - 1  )						,							len_list - 1  )  # Prevent out of range
				_snake_case	       =       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()





