#include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define INF (1 << 30) #define INFLL (1LL << 60) ll ng = 1000000001,ok = 0,n,mid,re; int main() { while(true){ mid = (ng + ok) / 2; if(ng - 1 != ok){ cout << "? " << mid << endl; cout.flush(); cin >> re; if(re){ ok = mid; }else{ ng = mid; } }else{ cout << "! " << ok << endl; cout.flush(); break; } } return 0; }