#include #include #include #include #include #include #include #include #include #include #include #include typedef long long ll; using namespace std; #define mod 1000003 #define INF 1000000000 #define LLINF 2000000000000000000LL #define SIZE 100 int ask(int Y){ cout << "? " << Y << endl; int res; cin >> res; return res; } void ans(int Y){ cout << "! " << Y << endl; return; } int main(){ int res; int l=10,r=1000000000,mid; if(ask(31)==-1){ for(int i=0;;i++){ if(ask(0)==0){ ans(i); } } } for(int i=1;i<=30;i++){ mid = (l+r)/2; int q = ask(mid-i); if(q==1){ l = mid+1; }else if(q==-1){ r = mid-1; }else{ ans(mid); return 0; } } return 0; }