x = 2 ** 29 while 1: print(x) if input() == 1 or -1: break else: x /= 2