s=10**9
while 1:
    s=s//2+2
    print(s)
    r=int(input())
    if r==1 or r==-1:
        exit()