#include using namespace std; int main () { int left = 1; int right = 1 << 30; while(true){ cout << (left + right) / 2 << endl; int ans; cin >> ans; if(ans == 0){ right = (left + right) / 2; } else { return 0; } } }