#include using namespace std; #define rep(i,n) for (long long i=0;i<(long long)(n);i++) #define all(v) v.begin(),v.end() using ll=long long; using pll=pair; using tll=tuple; const ll INF=(1ll<<60); template void chmin(T &a,T b){ if(a>b){ a=b; } } template void chmax(T &a,T b){ if(a> n; ll k=n/2; ll now=0; while(k--){ cout << "? " << now << " " << now+1 << endl; ll z; cin >> z; if(z==now){ cout << "! " << now+1 << endl; return 0; }else if(z==now+1){ cout << "! " << now << endl; return 0; } now+=2; } cout << "! " << n-1 << endl; }