#include<bits/stdc++.h> 
using namespace std;
#define int long long int 
// #define endl '\n'
#define mod 1000000007
const int N= 1e7+10;
vector<int>a;
vector<vector<int>>v;

signed main()
{
    // ios_base::sync_with_stdio(false);
    // cin.tie(NULL);
    // cout.tie(NULL);
    
    int n; cin>>n;
    int l=0;
    int r=n;
    int a,b;
    while(r-l>1)
    {
        int mid=l+(r-l)/2;
        cout<<"? "<<mid<<endl;
        cin>>a;
        cout<<"? "<<mid+1<<endl;
        cin>>b;
        if(a<b)
            r=mid;
        else
            l=mid;
    }
    cout<<"! "<<r<<endl;
    return 0;    
}