#include<bits/stdc++.h>
using namespace std;
// #pragma GCC optimize("Ofast")
// #pragma GCC optimize("unroll-loops")
// #pragma GCC target("avx2")
using ll = long long;
//using i128 = __int128_t;
//#define endl "\n"
#define int long long
#define db cout << "db" << endl;
#define x first
#define y second
typedef pair<int, int> PII;
const int N = 5e5 + 10;
ll inf = 2e18;
void solve() {
int n;
cin >> n;
int l = 1, r = n, cnt = 0;
while (l <= r) {
if (l == r) {
cout << "! " << l << endl;
return;
}
int mid = (l + r + 1) >> 1, x1, x2;
bool f1 = 0, f2 = 0;
cout << "? " << l << endl; cnt++;
cin >> x1;
if (x1 > prex1)
if (cnt % 2 != x1 % 2) {
cout << "! " << l << endl;
return;
}
cout << "? " << mid << endl; cnt++;
cin >> x2;
if (cnt % 2 != x2 % 2) {
cout << "! " << mid << endl;
return;
}
prex1 = x1; prex2 = x2;
if (x2 > x1) l = mid + 1;
else {
r = mid - 1;
l++;
}
}
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);cout.tie(0);
int q = 1;
//cin >> q;
while (q --) {
solve();
}
return 0;
}