left=0 ######### right=10**9 while right-left>1: c=(right+left)//2 print(c) x=int(input()) if x==0: right=c else: exit() left=c print(left)