#include using namespace std; int s; int main(){ long long mn = 0; long long mx = 1000000000; long long ce = (mn+mx)/2; while(mx-mn > 1){ cout << "? " << ce << endl; cin>>s; if(s){ mn = ce+1; }else{ mx = ce; } ce = mn+(mx-mn)/2; } cout << "! " << mx << endl; }