# include<bits/stdc++.h>

using namespace std ;

# define f first

# define s second

# define ll long long

# define pb push_back

# define mp make_pair

# define INF INT_MAX

# define INFL 1e18+10

# define mod 1000000007

# define rep( i , s , e ) for( int i = s ; i <= e ; i++ )

# define repR( i , e , s ) for( int i = e ; i >= s ; i-- )


const int maxN = 100001 ;

int arr[maxN] ;


int query( int id ) {

    if ( arr[id] ) return arr[id] ;

    cout << "? " << id << endl ;

    int a ;  cin >> a ;  return arr[id] = a ;
}

void ans( int id ) { cout << "! " << id ;  exit(0) ; }


void solve() {

    int n ;  cin >> n ;

    if ( n == 1 ) ans(1) ;


    int a = query(1) , b = query(2) ;  

    if ( a < b ) ans(1) ;

    int c = query( n - 1 ) , d = query(n) ;

    if ( d < c ) ans(n) ;


    int l = 2 , r = n - 1 ;

    while ( l < r ) {

        int mid = ( l + r ) / 2 ;

        a = query( mid - 1 ) , b = query( mid ) , c = query( mid + 1 ) ;

        if ( a > b ) {

            if ( c > b ) ans( mid ) ;

            l = mid ;
        }

        else r = mid ;
    }

    ans(l) ;
} 


int main() {

    ios_base::sync_with_stdio( false ) ;

    cin.tie(0) , cout.tie(0) ;

    solve() ;  return 0 ;
}