ok = 0 ng = int(2e9) + 1 while ng - ok > 1: md = (ok + ng) // 2 print(md) r = int(input()) if r == 1: ok = md else: ng = md print(md)