#include<cstdio>
const int N=100005;
int n,a[100005];
inline int ask2(int x){
    if(a[x]) return a[x];
    printf("? %d\n",x);
    fflush(stdout);
    scanf("%d",a+x);
    return a[x];
}
inline int ask(int x){
    if(ask2(x)>ask2(x+1)) return 1;
    else  return 0;
}
int main(){
    scanf("%d",&n);
    a[0]=a[n+1]=1e9;
    int l=1,r=n;
    int mid=(l+r)/2;
    while(r-l>20){
        mid=(l+r)/2;
        if(ask(mid)) l=mid+1;
        else r=mid;
    }
    for(int i=l-1;i<=r+1;i++)
        ask2(i);
    for(int i=l;i<=r;i++){
        if(a[i]<a[i+1]&&a[i]<a[i-1]){
            printf("! %d\n",i);
            return 0;
        }
    }
    return 0;
}