def find_peak(arr, n):
	def find_peak_util(arr, low, high, n): 
		mid = low + (high - low)/2
		mid = int(mid) 
		if ((mid == 0 or arr[mid - 1] <= arr[mid]) and
			(mid == n - 1 or arr[mid + 1] <= arr[mid])): 
			return mid 
		elif (mid > 0 and arr[mid - 1] > arr[mid]): 
			return find_peak_util(arr, low, (mid - 1), n) 
		else: 
			return find_peak_util(arr, (mid + 1), high, n) 
	 
	return find_peak_util(arr, 0, n - 1, n) 
def find_peak(arr, n):
    def find_peak_util(arr, low, high, n):
        VAR_0 = low + (high - low) / 2
        VAR_0 = int(VAR_0)
        if (VAR_0 == 0 or arr[VAR_0 - 1] <= arr[VAR_0]) and (
            VAR_0 == n - 1 or arr[VAR_0 + 1] <= arr[VAR_0]
        ):
            return VAR_0
           
        elif VAR_0 > 0 and arr[VAR_0 - 1] > arr[VAR_0]:
            return find_peak_util(arr, low, (VAR_0 - 1), n)
        else:
            return find_peak_util(arr, (VAR_0 + 1), high, n)
    return find_peak_util(arr, 0, n - 1, n)