ok = 0 ng = 10**18 while ng - ok > 1: mid = (ok + ng) // 2 print(mid) r = int(input()) if r == 1: ok = mid exit() elif r == 0: ng = mid else: exit()