#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <functional>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define REP(i,N) FOR(i,0,N)
#define FORD(i,b,a) for (int i = (int)(b)-1; i >= a; --i)

using namespace std;

typedef long long LL;
typedef pair<int, int> PII;
#define st first
#define nd second
#define pb push_back

const int MOD = 1000000007;

void scase() {
}

void answer(int k) {
    printf("! %d\n", k);
    exit(0);
}

int memo[111111];
int query(int k) {
    if (memo[k]) return memo[k];

    printf("? %d\n", k);
    fflush(stdout);
    int ans;
    scanf("%d", &ans);
    return memo[k] = ans;
}

void go(int L, int R) {
    if (L == R) {
        answer(L);
    }
    if (L + 1 == R) {
        answer(query(L) < query(R) ? L : R);
    }

    int S = (L+R)/2;
    if (query(S-1) < query(S)) {
        go(L,S-1);
    } else if (query(S+1) < query(S)) {
        go(S+1,R);
    } else {
        answer(S);
    }

}

int main() {
    int N;
    scanf("%d", &N);
    int L = 1, R = N;
    go(L,R);
}
