#include <bits/stdc++.h>
#define X first
#define Y second

using namespace std;
typedef long long llint;

const int maxn = 2e5+10;
const int base = 31337;
const int mod = 1e9+7;
const int inf = 0x3f3f3f3f;
const int logo = 20;
const int off = 1 << logo;
const int treesiz = off << 1;

int n;
int a[maxn];

int query(int x) {
	if (a[x] != -1) return a[x];
	printf("? %d\n", x);
	fflush(stdout);
	
	scanf("%d", a+x);
	return a[x];
}

int main() {
	scanf("%d", &n);
	memset(a, -1, sizeof a);
	
	int lo = 1;
	int hi = n;
	a[0] = inf;
	a[n + 1] = inf;
	while (lo < hi) {
		int mid = (lo + hi) / 2;
		
		int a = inf;
		int b = query(mid);
		int c = inf;
		if (mid > 0) a = query(mid - 1);
		if (mid < n) c = query(mid + 1);
		
		if (b < min(a, c)) {
			printf("! %d\n", mid);
			return 0;
		} else if (a < b && b < c) {
			hi = mid - 1;
		} else lo = mid + 1;
	}
	printf("! %d\n", lo);
	return 0;
}

