#include<bits/stdc++.h>
using namespace std;
int ask(int i){
 int r;
 cout<<"? "<<i<<"\n";
 fflush(stdout);
 cin >> r;
 return r;
}
int main(){
	int n;
	cin >> n;
    if(n<=100){
    	int a[n];
    	for(int i=0;i<n;i++){
    		a[i]=ask(i+1);
    	}
    	if(a[0]<a[1]){
    		cout<<"! 1\n";
            fflush(stdout);
            return 0;
    	}
    	else if(a[n-1]<a[n-2]){
    		cout<<"! "<<n<<"\n";
    		fflush(stdout);
    		return 0;
    	}
    	else{
    		
    	for(int i=1;i<n-1;i++){
             if((a[i]<a[i+1])&&(a[i]<a[i-1])){
             cout<<"! "<<i+1<<"\n";
    		fflush(stdout);
    		return 0;
             }
    	}
    	
    }
    }
    else{
    vector<int> a(n,-1);
    a[0]=ask(1);
    a[1]=ask(2);
    a[n-1]=ask(n);
    a[n-2]=ask(n-1);
    if(a[0]<a[1]){
    	cout<<"! 1\n";
        fflush(stdout);
        return 0;	
    }
    else if(a[n-1]<a[n-2]){
    	cout<<"! "<<n<<"\n";
    	fflush(stdout);
    	return 0;
    }
    int l=1;
    int h=n-2;
    while(l<=h){
    	int mid=l+(h-l)/2;
        if(a[mid]==-1){a[mid]=ask(mid+1);}
        if(a[mid+1]==-1){a[mid+1]=ask(mid+2);}
        if(a[mid-1]==-1){a[mid-1]=ask(mid);}
        if((a[mid]<a[mid+1])&&(a[mid]<a[mid-1])){
        	cout<<"! "<<mid+1<<"\n";
        	fflush(stdout);
        	return 0;
        }
        else if((a[mid]<a[mid+1])&&(a[mid]>a[mid-1])){
        h=mid-1;
        }
        else if((a[mid]>a[mid+1])&&(a[mid]<a[mid-1])){
        	l=mid+1;
        }
        else if((a[mid]>a[mid+1])&&(a[mid]>a[mid-1])){
        	if(mid<n-mid){
        		h=mid-1;
        	}
        	else{
        		l=mid+1;
        	}
        }
    }
    }
}