#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define pii pair<int,int>
#define pll pair<ll,ll>
#define pb push_back
#define f first
#define s second
#define mk make_pair
#define lc(i,j) lexicographical_compare(i.begin(),i.end(),j.begin(),j.end())
int main()
{
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  #ifndef ONLINE_JUDGE
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
  #endif
  int t=1;
  //cin>>t;
  while(t--)
  {
    int n;
    cin>>n;
    int a[n+2];
    memset(a,0,sizeof(a));
    a[0]=1e9;
    a[n+1]=1e9;
    int l=1;
    int r=n;
    int cnt=100;
    int idx;
    while(cnt)
    {
      int mid=(l+r)/2;
      if(a[mid]==0)
      {
        printf("? %d\n",mid);
        fflush(stdout);
        cin>>a[mid];
        cnt--;
      }
      if(a[mid-1]==0)
      {
        printf("? %d\n",mid-1);
        fflush(stdout);
        cin>>a[mid-1];
        cnt--;
      }
      if(a[mid+1]==0)
      {
        printf("? %d\n",mid+1);
        fflush(stdout);
        cin>>a[mid+1];
        cnt--;
      }
      if(a[mid]<a[mid-1]&&a[mid]<a[mid+1])
      {
        idx=mid;
        break;
      }
      else if(a[mid-1]>a[mid]&&a[mid]>a[mid+1])
        l=mid+1;
      else
        r=mid-1;
    }
    printf("! %d\n",idx);
    fflush(stdout);
  }//while  
}//main
   	 		 		 	 		 	      			 	 	