l=0 r=1+10**9 while r-l>1: m=(l+r)//2 print(m) x=input() if x=="1": exit() if x=="0":r=m else:l=m print(l)