#include<iostream>
#include<cstdlib>
#include<cstdio>
using namespace std;
int main()
{
int ll=1,rr=1000000000,opt;
while(ll<=rr)
{
int mid=(ll+rr)/2;
printf("%d\n",mid);
fflush(stdout);
scanf("%d",&opt);
if(opt==1)return 0;
else if(opt==-1)ll=mid+1;
else rr=mid-1;
}
return 0;
}