#include using namespace std; using i64 = int64_t; using vi = vector; using vvi = vector; int cnt; void ask(int x) { cout << "? " << x << endl; cnt++; } void ans(int x) { cout << "! " << x << endl; exit(0); } int res; int main() { bool ge100; ask(100); cin >> res; if (res == 0) { ans(100); } else if (res == 1) { ge100 = true; } else { ge100 = false; } if (!ge100) { while (1) { ask(8); cin >> res; if (res == 0) { ans(8 + cnt - 1); } } } int l = 99, r = 1e9 + 1; while (l < r - 5) { int m = (l + r) / 2; ask(m); cin >> res; if (res == 1) { r = m; } else if (res == 0) { ans(res + cnt - 1); } else { l = m; } l--; } while (1) { ask(l); cin >> res; if (res == 0) { ans(l + cnt - 1); } } }