


#include<bits/stdc++.h>
using namespace std;
#define ll long long int 
#define pb   push_back
#define T int time;        scanf("%d", &time); while(time--)
const ll N=1000000;
const int Nmax = 5e5+7;
      ll ask(ll n){
      	ll a ;
      	cout << "? " << n << endl ;
      	cin >> a ;
      	return a ;
      }


        int main(){

        		ll n , mid , l , r , a , b , c , ans ;
        		cin >> n ;
        		l =1 , r = n ;
        		if(n == 1){
        			cout << "! " << "1" << endl ;
        			return 0 ;
        		}
        		while(l <= r){
        			mid = (l + r)/2 ;
        			if(mid == 1){
        				a = ask(mid) ;
        				b = ask(mid+1) ;
        				if(a > b){
        					l = mid+1 ;
        				}
        				else {
        					ans = mid ;
        					break ;
        				}
        				continue ;
        			}
        			if(mid == n){
        				a = ask(mid) ;
        				b = ask(mid - 1) ;
        				if(a > b) r = mid-1 ;
        				else 
        					{
        						ans = mid ;
        						break ;
        					}
        				continue ;
        			}

        			a = ask(mid+1) ;
        			b = ask(mid) ;
        			c = ask(mid - 1) ;
        			if(b > a) l = mid+1 ;
        			else if(b > c) r = mid-1 ;
        			else {
        				ans = mid ;
        				break ;
        			}

        		}
        		cout <<"! "<< ans << endl ;




        }
		 	 	   		 		 		 		  	 		  	