#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; //define #define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl; #define dump(x) cerr << #x << " = " << (x) << endl; #define INF (INT_MAX/2) #define PI (2*acos(0.0)) #define EPS (1e-8) #define REP(i,a,b) for(int i=(a); i<(b);++i) #define rep(i,n) REP(i,0,n) typedef long long ll; typedef unsigned long long ull; typedef pair pii; typedef pair pll; typedef vector vint; typedef vector > vvint; typedef vector vll; typedef vector > vvll; int dx[8] = {0, 1, 0, -1, 1, -1, 1, -1}; int dy[8] = {1, 0, -1, 0, 1, -1, -1, 1}; int main(void){ ios_base::sync_with_stdio(0); ll lb = 0, ub = 1000000001; while(lb + 1 < ub){ ll mid = (lb + ub) / 2; cout << "? " << mid << endl; int ans; cin >> ans; if(ans) lb = mid; else ub = mid; } cout << "! " << lb << endl; return 0; }