#include using namespace std; int main(){ long long data; long long right = 1000000000, left = 1, mid; int count = 0; while(1){ mid = (right+left) / 2; cout << "? " << mid << endl; cin >> data; if(data){ left = mid + 1; count++; }else{ right = mid - 1; count = 0; } if(count == 2){ cout << "! " << mid << endl; break; } } return 0; }