#include #include using namespace std; using namespace atcoder; #define OVERLOAD_REP(_1, _2, _3, _4, name, ...) name #define REP1(i, n) for (auto i = std::decay_t{}; (i) < (n); ++(i)) #define REP2(i, l, r) for (auto i = (l); (i) < (r); ++(i)) #define REP3(i, l, r, d) for (auto i = (l); (i) < (r); i += (d)) #define rep(...) OVERLOAD_REP(__VA_ARGS__, REP3, REP2, REP1)(__VA_ARGS__) #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define YesNo(b) ((b) ? "Yes" : "No") #define YESNO(b) ((b) ? "YES" : "NO") #define yesno(b) ((b) ? "yes" : "no") using mint = modint998244353; using ull = unsigned long long; using ll = long long; using vi = vector; using vll = vector; using vb = vector; using vvi = vector; using vvll = vector; using vs = vector; using vvs = vector; using pii = pair; using pll = pair; using vpii = vector; const vi dx = {1, 0, -1, 0}; const vi dy = {0, 1, 0, -1}; constexpr int INF = 1 << 30; constexpr ll LINF = 1LL << 60; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n = 5e8; while (true) { cout << n << endl; int r; cin >> r; if (r == 1 || r == -1) break; n++; n /= 2; } }