#include #include using namespace std; const int INF = 1e+9; int main() { cin.tie(0); ios::sync_with_stdio(false); int lb = 1, ub = INF+1, res; while(ub - lb > 1){ int mid = (lb + ub) / 2; cout << "? " << mid << endl; cin >> res; if(res){ lb = mid; } else{ ub = mid; } } cout << "! " << lb << endl; return 0; }