






'''simple docstring'''







def 		_UpperCAmelCase   (							__A							:   int						,		__A							:   str      ):
				a_		:  Any											=      0
				while b > 0:
								if b & 1:
												res += a

								a += a
								b >>= 1

				return res





def 		_UpperCAmelCase   (							__A							:   Any						,		__A							:   Tuple						,		__A							:   Dict      ):
				a_		:  str											=      0
				while b > 0:
								if b & 1:
												a_		:  Dict											=      ((res % c) + (a % c)) % c

								a += a
								b >>= 1

				return res












'''simple docstring'''







from __future__ import annotations





def 		_UpperCAmelCase   (							__A							:   list[int]      ):
				a_		:  int											=      len(__A      ) // 2

				# choose the middle 3 elements
				a_		:  Dict											=      lst[m - 1 : m + 2]

				# if middle element is peak
				if three[1] > three[0] and three[1] > three[2]:
								return three[1]

				# if increasing, recurse on right
				elif three[0] < three[2]:
								if len(lst[:m]      ) == 2:
												m -= 1
								return peak(lst[m:]      )

				# decreasing
				else:
								if len(lst[:m]      ) == 2:
												m += 1
								return peak(lst[:m]      )


if __name__ == "__main__":
		import doctest

		doctest.testmod()




