#include<bits/stdc++.h>
using namespace std;
using namespace std::chrono;

#define IOS ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define int long long
#define rep(i,a,b)    for(int i=a;i<b;i++)
#define repn(i,a,b)   for(int i=a;i>=b;i--)
#define ff first
#define ss second
#define lb lower_bound
#define ub upper_bound
#define pii pair<int,int>
#define vi vector<int>
#define vii vector<pii>
#define vvi vector<vector<int>>
#define mi  map<int,int>
#define mii map<pii,int>
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define sz(x) (int)x.size()
#define all(v) (v).begin(), (v).end()   
#define ret(x) return cout<<x,0;
#define rety return cout<<"YES",0;
#define retn return cout<<"NO",0;
#define fl fflush(stdout)   
#define mod 1000000007
#define hell2 998244353 
#define pi 3.14159265358979323846
#define piii pair<pii,int>
int fexp(int a, int b,int m){int ans = 1;while(b){if(b&1)ans=ans*a%m; b/=2;a=a*a%m;}return ans;}
int inverse(int a, int p){return fexp(a, p-2,p);} 

int fac[300005]; //fac[0]=0;fac[1]=1;rep(i,2,300005)fac[i]=(fac[i-1]*i)%hell;

int ncr(int n, int r,int p) { 
    if (r==0) return 1; 
    return (fac[n]*inverse(fac[r],p)%p*inverse(fac[n-r],p)%p)%p; 
}

bool sortby(pii &a,pii &b){
    return (a.ff<b.ff);
    /*if(a.ff.ff==b.ff.ff)return (a.ff.ss<b.ff.ss);
    return (a.ff.ff<b.ff.ff);
    if(a.ss==b.ss)return (a.ff<b.ff);
    return (a.ss<b.ss);*/
}

int solve(){
    int n;
    cin>>n;
    int l=1,r=n,ans;
    while(l<=r){
        int m=(r+l)/2;
        int x,y,z;
        //if(m==1||m==n)break;
        if(m!=1){
        	cout<<"? "<<m-1<<endl;fl;
        	cin>>x;
    	}
    	else x=1e9;
        cout<<"? "<<m<<endl;fl;
        cin>>y;
        if(m!=n){
        	cout<<"? "<<m+1<<endl;fl;
        	cin>>z;
    	}
    	else z=1e9;
        if(y>x)r=m-1;
        else l=m+1;
        if(y<x&&y<z){
        	cout<<"! "<<m;fl;
        	return 0;
        	//break;
        }
        //l=m+1;
    }
    cout<<"! "<<l;
    return 0;       
}

signed main(){
    auto start = high_resolution_clock::now();
    IOS;
    int t=1;
    #ifndef ONLINE_JUDGE
    freopen("input.txt", "r" , stdin);
    freopen("output.txt", "w", stdout);
    #endif
    //cin>>t;
    while(t--){
        solve();
        cout<<"\n";
    }
    auto stop = high_resolution_clock::now();
    auto duration = duration_cast<microseconds>(stop - start);
    cerr<<"Time taken:"<<duration.count()/1000000.0<<"seconds"<<"\n";
    return 0;
}