#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 l=10,r=1000000000,mid; if(ask(35)==-1){ for(int i=1;;i++){ if(ask(0)==0){ ans(i); return 0; } } } for(int i=1;;i++){ if(l==r){ ans(l); return 0; } mid = (l+r)/2; int q = ask(mid-i); if(q==1){ l = mid+1; }else if(q==-1){ r = mid; }else if(q==0){ ans(mid); return 0; } } return 0; }