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

const int N = 2e5;

int Q(int x) {
    printf("? %d\n", x);
    fflush(stdout);
    scanf("%d", &x);
    return x;
}
int n,a[N];

void solve() {
    cin >> n;
    if(n == 1) {
        printf("! 1");
        return ;
    }
    int l = 2, r = n - 1;
    a[1] = Q(1);
    a[2] = Q(2);
    if(a[2] > a[1]) {
        printf("! 1"); return ;
    }
    a[n] = Q(n);
    a[n - 1] = Q(n - 1);
    if(a[n - 1] > a[n]) {
        printf("! %d",n); return ;
    }
    int ans = 0;
    while(l <= r) {
        int mid = l + r >> 1;
        int x = Q(mid - 1), y = Q(mid), z = Q(mid + 1);
        if(x < y && y < z) ans = mid, r = mid - 1;
        else if(x >y && y > z) ans = mid, l = mid +1;
        else if(x > y && y < z) {
            ans = mid; break;
        }
        else l = mid +1;
    }
    printf("! %d\n",ans);
}

int main() {
    int cas = 1; //cin >> cas;
    while(cas--) solve();
}
