#include <bits/stdc++.h>

using namespace std;
const int maxn = 1e5 + 5;
int val[maxn];

int getVal(int pos) {
    if (val[pos] == 0) {
        cout << "? " << pos << endl;
        cout.flush();
        cin >> val[pos];
    }
    return val[pos];
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int n;
    cin >> n;
    val[0] = val[n + 1] = INT_MAX;
    int l = 1, r = n;
    while (l + 5 <= r) {
        int p1 = l + r >> 1;
        int p2 = p1 + 1;
        if (getVal(p1) < getVal(p2)) {
            r = p2;
        } else {
            l = p1;
        }
    }
    for (int i = l; i <= r; i++) {
        if (getVal(i - 1) > getVal(i) && getVal(i) < getVal(i + 1)) {
            cout << "! " << i << endl;
            cout.flush();
            return 0;
        }
    }
    return 0;
}
