#include <bits/stdc++.h>
using namespace std;
#define faster ios_base::sync_with_stdio(false) ; cin.tie(NULL)

const int INF= 1e6 + 7;
const int N = 1e5 + 7;
int a[N] , n;
void inp(){
    cin >> n;
}

int ask(int id){
    if (id < 1 || id > n) return INF;
    if (a[id] != 0) return a[id];

    cout << "? " << id << '\n';
    cout.flush();

    int res;
    cin >> res;
    a[id] = res;
    return a[id];
}

void solve(){
    int l = 1 , r = n , mid;
    while (l <= r){
        mid = (l + r) >> 1;
        int Mid = ask(mid) , L = ask(mid - 1) , R = ask(mid + 1);
        if (Mid < L && Mid < R){
            cout << "! " << mid << '\n';
            cout.flush();
            return;
        }
        if (Mid > L){
            r = mid - 1;
        }
        else if (Mid > R){
            l = mid + 1;
        }
    }
}

int main(){
    faster;
    inp();
    solve();
    return 0;
}

