count = 0 L = 1 R = 10 ** 9 count = 0 while L <= R: mid = L + (R - L) // 2 if count == 30: break print(mid) r = int(input()) if r == 0: R = mid - 1 else: break count += 1