#include <bits/stdc++.h>
using namespace std;
#define int long long
const int INF = 1e18;
const int MOD = 1e9+7;
const int MAXN = 2e5;
int n, m;
int arr[MAXN+5];
bool ask(int l, int r){
cout << "? " << l << ' ' << r << endl;
bool jury; cin >> jury;
return jury;
}
bool check(int target){
for(int i = 1; i <= n - target + 1; i++){
if(ask(i, i + target - 1)) return 1;
}
return 0;
}
void solve(){
cin >> n;
int ans = 1;
// panjang ganjil
// cerr << "GANJIL" << endl;
int left = 1, right = n/2;
int mid;
while(left <= right){
mid = (left + right) / 2;
if(check(mid * 2 + 1)){
ans = max(mid * 2 + 1, ans);
left = mid + 1;
}else{
right = mid - 1;
}
}
// panjang genap
// cerr << "GENAP" << endl;
left = 1; right = n/2;
mid = 0;
while(left <= right){
mid = (left + right) / 2;
if(check(mid * 2)){
ans = max(mid * 2, ans);
left = mid + 1;
}else{
right = mid - 1;
}
}
cout << "! " << ans << endl;
}
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
int tc = 1;
// cin >> tc;
while(tc--){
solve();
}
return 0;
}