#include <iostream>
#include <vector>
using namespace std;
#define ll long long
int main(){
ll n;
cin >> n;
//bsta for maximum length
auto feasible = [&](ll len){
//start+len-1 <= n
//start <= n - len+1
//cout << "Checking for palindromes with length " << len << "\n";
for (ll start = 1; start <= n - len+1; ++start){
ll end = start+len-1;
cout << "? " << start << " " << end << "\n";
cout.flush();
bool ok;
cin >> ok;
if (ok) return true;
}
return false;
};
//do even and odd lengths seperately
vector <ll> even, odd;
for (ll i = 1; i <= n; ++i){
if (i%2 == 0) even.push_back(i);
else odd.push_back(i);
}
//even
ll low = 0, high = even.size()-1, mid, ans = -1;
while (low <= high){
//cout << "L, H:" << low << " " << high << "\n";
mid = (low+high)/2;
ll curLen = even[mid];
if (feasible(curLen)){
ans = mid;
low = mid+1;
}
else high = mid-1;
}
//odd
ll low2 = 0, high2 = odd.size()-1;
ll mid2, ans2 = -1;
while (low2 <= high2){
//cout << "L, H:" << low << " " << high << "\n";
mid2 = (low2+high2)/2;
ll curLen = odd[mid2];
if (feasible(curLen)){
ans2 = mid2;
low2 = mid2+1;
}
else high2 = mid2-1;
}
cout << "! " << (ll)max((ans != -1 ? even[ans] : 1), (ans2 != -1 ? odd[ans2] : 1)) << "\n";
cout.flush();
return 0;
}