#include using namespace std; using ll = long long; bool chmin(auto &a, const auto &b) { if (a <= b) return 0; a = b; return 1; } bool chmax(auto &a, const auto &b) { if (a >= b) return 0; a = b; return 1; } void solve(); int main() { cin.tie(0)->sync_with_stdio(0); cout << fixed << setprecision(20); ll t = 1; // cin >> t; for (int i = 1; i <= t; i++) solve(); return 0; } // ll dy[8] = {1, 1, 0, -1, -1, -1, 0, 1}, dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}; ll dy[] = {0, 1, 0, -1}, dx[] = {1, 0, -1, 0}; void solve() { ll val = 5e8; while (true) { cout << val << endl; ll r; cin >> r; if (r != 0) break; if (val % 2) val = (val + 1) / 2; else val /= 2; } }