#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ld long double
#define all(v) v.begin(), v.end()
#define vll vector<ll>
#define vi vector<int>
#define pll pair<ll,ll>
#define pb push_back
#define ff first
#define ull unsigned long long
#define ss second
const ll N = 100005;
ll p[N]={}, h[N]={};
void solve()
{
    ll n,m=0,i=1,j=0, l=0, r=0;
    ll sum = 0, y=0, q, z=0, ans=0, x, k=0, a;
    cin>>n;
    l=1, r=n;
    ll mid=0;
    ll amid, amidl, amidr;
    if(n==1) {
        cout<<"! "<<1<<flush;
        return;
    }
    while(1) {
        mid=(l+r)/2;
        cout<<"? "<<mid<<endl<<flush;
        cin>>amid;
        if(mid>1) {
        cout<<"? "<<mid-1<<endl<<flush;
        cin>>amidl;
        }
        else amidl=n+2;
        if(mid<n) {
        cout<<"? "<<mid+1<<endl<<flush;
        cin>>amidr;
        }
        else amidr=n+2;
        if((mid==1||amidl>amid) && (mid==n||amidr>amid)) 
        {
            cout<<"! "<<mid<<endl<<flush;
            return;
        }
        else if (amidl<amid) r=mid-1;
        else l=mid+1;
        
    }
}
    
int main()
{
    ios::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);
    int T=1;
    //cin>>T;
    while(T--)solve();
    return 0;
}