#include #define rep(i, a) for (int i = 0; i < (a); i++) #define rep2(i, a, b) for (int i = (a); i < (b); i++) using namespace std; typedef long long ll; const ll inf = 1e9; const ll mod = 1e9 + 7; // (left, right] int minimum(bool(*C)(int), int left, int right) { while (right - left > 1) { int mid = (left + right) / 2; (C(mid) ? right : left) = mid; } return right; } bool C(int x) { int t; cout << "? x" << endl; cin >> t; return t; } int main() { cout << "! " << minimum(C, 0, 1e9 + 2) << endl; }