#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int N, v; cin >> N; for(int i = 0; i < N; i += 2){ cout << "? " << i << " " << i + 1 << endl; cin >> v; if(v == i || v == i + 1){ cout << "! " << ((i + 1) ^ i ^ v) << endl; return 0; } } cout << "! " << N - 1 << endl; }