#include<bits/stdc++.h>

using namespace std;

const int N=1e5+10;

int n;
int a[N];
void get(int i)
{
	if(!a[i])
	{
		cout<<'?'<<' '<<i<<endl;
		cin>>a[i];
	}
}
void over(int i)
{
	cout<<'!'<<' '<<i<<endl;
}

int main()
{
//	freopen("1.in","r",stdin);
	
	scanf("%d",&n);
	if(n==1){over(1);return 0;}
	a[0]=a[n+1]=n+1;
	
	get(1);get(2);
	if(a[1]<a[2]){over(1);return 0;}
	get(n-1);get(n);
	if(a[n-1]>a[n]){over(n);return 0;}
	
	int l=2,r=n-1;
	while(l<r)
	{
		int mid=(l+r)/2;
		get(mid);get(mid+1);
		if(a[mid]<a[mid+1])r=mid;
		else l=mid+1;
	}
	over(l);
	
	return 0;
}
