def test(x): print(x) return int(input()) x = 1<<29 while True: if test(x): exit() x >>= 1