#include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair i_i; int MOD = 1000000007; int main() { int lb = 0, ub = 1000000001; int t = 0; while (ub - lb > 1) { int mid = (lb + ub) / 2; cout << "? " << mid - t << endl; int x; cin >> x; if (x == 0) { cout << "! " << mid << endl; return 0; } if (x == 1) lb = mid; else ub = mid; t--; } }