            /**************************************
    Author : Susanka Majumder ( bingobong )
    ***************************************/
   #include<bits/stdc++.h>   
  #ifndef ONLINE_JUDGE
   #include<sys/resource.h>
    #include <sys/time.h>
    #endif

    using namespace std;
     
    /* Template file for Online Algorithmic Competitions */
    /* Typedefs */
        /* System Controllers */
        const long long CPU_TIME = 3 ; // CPU time program has acess to ( in seconds )
        const long long MAX_FILE_SIZE = 1024*1024 ; // Maximum File size that the program can create 
        /* Basic types */
        typedef long long           ll;
        typedef long double         ld;
        typedef unsigned long long ull;
        /* STL containers */
        typedef vector <int>    vi;
        typedef vector <ll>     vll;
        typedef pair <int, int> pii;
        typedef pair <ll, ll>   pll;
        typedef vector < pii >  vpii;
        typedef vector < pll >  vpll;
        typedef vector <string> vs;
        typedef vector < vi >   vvi;
        typedef vector < vll >  vvll;
        typedef vector < vpii > vvpii;
        typedef set <int>       si;
    /* Macros */
        /* Loops */
        #define fl(i, a, b)     for(int i(a); i <= (b); i ++)
        #define rep(i, n)       fl(i, 1, (n))
        #define loop(i, n)      fl(i, 0, (n) - 1)
        #define rfl(i, a, b)    for(int i(a); i >= (b); i --)
        #define rrep(i, n)      rfl(i, (n), 1)
        /* Algorithmic functions */
        #define pow2(x) ((x)*(x))
        #define mod(x, m) ((((x) % (m)) + (m)) % (m))
        #define max3(a, b, c) max(a, max(b, c))
        #define min3(a, b, c) min(a, min(b, c))
        #define srt(v)          sort((v).begin(), (v).end())
        /* STL container methods */
        #define pb              push_back
        #define mp              make_pair
        #define eb              emplace_back
        /* String methods */
        #define dig(i)          (s[i] - '0')
        #define slen(s)         s.length()
        /* Shorthand notations */
        #define fr              first
        #define sc              second
        #define re              return 
        #define sz(x)           ((int) (x).size())
        #define all(x)          (x).begin(), (x).end()
        #define sqr(x)          ((x) * (x))
        #define fill(x, y)      memset(x, y, sizeof(x))
        #define clr(a)          fill(a, 0)
        #define endl            '\n'
        /* Mathematical */
        #define IINF            0x3f3f3f3f
        #define LLINF           1000111000111000111LL
        #define PI              3.14159265358979323
        #define NIL             -1
        /* Debugging purpose */
       #define db(...) ZZ(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1> void ZZ(const char* name, Arg1&& arg1){std::cerr << name << " = " << arg1 << endl;}
template <typename Arg1, typename... Args>void ZZ(const char* names, Arg1&& arg1, Args&&... args)
{
    const char* comma = strchr(names + 1, ',');
    std::cerr.write(names, comma - names) << " = " << arg1;
    ZZ(comma, args...);
}
        /* Fast Input Output */
        #define FAST_IO                  ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
    /* Constants */
        const ll MOD = 1000000007LL;
        const ll MAX = 100010LL;
    /* Templates */
    template<class T> T abs(T x) { re x > 0 ? x : -x; }
    template<typename T> T gcd(T a, T b){ if(b == 0) return a; return gcd(b, a % b); }
    template<typename T> T power(T x, T y, ll m = MOD){T ans = 1; x %= m; while(y > 0){ if(y & 1LL) ans = (ans * x)%m; y >>= 1LL; x = (x*x)%m; } return ans%m; }
    /*input and output of non standard data types*/
    template<typename T> istream& operator >> (istream& cin,vector<T> &a){
        for(auto &i:a)cin>>i;
        return cin;
    }
    template<typename T> ostream& operator << (ostream& cout,vector<T> &a){
        for(auto &i:a)cout<<i<<" ";
        return cout;
    }
    /* additional*/
    #define tr(c,i) for(auto i = (c).begin(); i != (c).end(); i++)
    #define present(c,x) ((c).find(x) != (c).end())
    #define cpresent(c,x) (find(all(c),x) != (c).end())
    //double inf = 1.0/0.0;
   
    int main(){

  
        // #ifndef ONLINE_JUDGE
        // freopen("input.txt","r",stdin); 
        // freopen("output.txt","w",stdout);
        // freopen("error.txt","w",stderr);
        // /* setting up soft limit on resources */
        // rlimit rlim , rlim_time ;
        // if(getrlimit( RLIMIT_FSIZE , &rlim) || getrlimit(RLIMIT_CPU , &rlim_time) )  
        //     return 1 ; 
        // rlim.rlim_cur = MAX_FILE_SIZE ; 
        // rlim_time.rlim_cur = CPU_TIME ; 
        // if(setrlimit( RLIMIT_FSIZE , &rlim ) || setrlimit(RLIMIT_CPU , &rlim_time))
        //     return 2 ; 

        // #endif
        
        FAST_IO;

        int n ; 
        cin>>n ;
        cout<<flush ; 

        int  l = 0 , r  = n+1 ; 


        while(r-l>1){
        	int mid = (l+r)/2 ;
        	int x = INT_MAX , y = INT_MAX ;  

        		cout<<"? "<<mid<<endl ; 
        		cout<<flush ; 
        		cin>>x ; 
        		if(mid>= 0 && mid <= n-1 )
        		{
        			cout<<"? "<<mid+1<<endl ; 
        			cout<<flush ; 
        			cin>>y ; 
        		}

        		if(x<y)
        			r = mid ; 
        		else
        			l = mid ; 

        	
        }

        cout<<"! "<<r<<endl ; 


      
        
        #ifndef ONLINE_JUDGE
        cout<<"\nTime Elapsed: " << 1.0*clock() / CLOCKS_PER_SEC << " sec\n";
        #endif
        return 0;
    }
    
