#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; for (int i = 0; i < n / 2; i++) { cout << "? " << 2 * i << ' ' << 2 * i + 1 << endl; int z; cin >> z; if (z == 2 * i) { cout << "! " << 2 * i + 1 << endl; return 0; } else if (z == 2 * i + 1) { cout << "! " << 2 * i << endl; return 0; } } cout << "! " << n - 1 << endl; }