#include <bits/stdc++.h>
using namespace std;
#define int long long
#define INF 1e18
void solve() {
int n;
cin >> n;
int ans = 1;
// odd
for (int i = 1; i < n; i++) {
int l = i - 1, r = i + 1, yes = 1;
while (l >= 1 && r <= n) {
cout << "? " << l << " " << r << endl;
cin >> yes;
if (!yes) break;
ans = max(ans, r - l + 1);
l--, r++;
}
}
// even
for (int i = 1; i <= n; i++) {
int l = i - 1, r = i, yes = 1;
while (l >= 1 && r <= n) {
cout << "? " << l << " " << r << endl;
cin >> yes;
if (!yes) break;
ans = max(ans, r - l + 1);
l--, r++;
}
}
cout << "! " << ans << endl;
}
int32_t main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
solve();
return 0;
}