r=10**9+1 l=0 while r-l>1: mid=(r+l)//2 print(mid,flush=True) if int(input()): print(mid,flush=True) exit() else: r=mid