#include #include #include using namespace std; int main() { cin.tie(nullptr); ios::sync_with_stdio(false); int32_t x = 1'000'000'000, r; do { x = (x + 1) >> 1; cout << x << endl; } while (cin >> r, r == 0); return 0; }