





'''simple docstring'''




import math
from decimal import Decimal, getcontext



def 						__A						(       lowerCamelCase_ = 4_00_00_00					):


  """simple docstring"""



  try:
    SCREAMING_SNAKE_CASE				:							List[Any]						=	int(lowerCamelCase_					)
  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."""					)
  SCREAMING_SNAKE_CASE				:							Dict						=	1_00
  SCREAMING_SNAKE_CASE				:							Any						=	(Decimal(5					) ** Decimal(0.5					) + 1) / Decimal(2					)

  SCREAMING_SNAKE_CASE				:							List[Any]						=	(math.floor(math.log(n * (phi + 2)	,	lowerCamelCase_					) - 1					) // 3) * 3 + 2
  SCREAMING_SNAKE_CASE				:							List[str]						=	Decimal(round(phi ** Decimal(index + 1					)					)					) / (phi + 2)
  SCREAMING_SNAKE_CASE				:							Dict						=	num // 2
  return int(lowerCamelCase_					)


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










'''simple docstring'''




from __future__ import annotations



def 						__A						(       lowerCamelCase_	,	lowerCamelCase_	,	lowerCamelCase_	,	lowerCamelCase_					):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE,    SCREAMING_SNAKE_CASE				:							List[Any]						=	m - 1, 0
		while i >= 0 and j < n:
				if key == mat[i][j]:
						print(f'''Key {key} found at row- {i + 1} column- {j + 1}'''					)
						return
				if key < mat[i][j]:
						i -= 1
				else:
						j += 1
		print(f'''Key {key} not found'''					)



def 						__A						(       ):


		"""simple docstring"""



		SCREAMING_SNAKE_CASE				:							Optional[Any]						=	[[2, 5, 7], [4, 8, 13], [9, 11, 15], [12, 17, 20]]
		SCREAMING_SNAKE_CASE				:							Dict						=	int(input("""Enter the element to be searched:"""					)					)
		print(lowerCamelCase_					)
		search_in_a_sorted_matrix(lowerCamelCase_	,	len(lowerCamelCase_					)	,	len(mat[0]					)	,	lowerCamelCase_					)


if __name__ == "__main__":
							import doctest

							doctest.testmod()
							main()



