def check(m): print(m) r = int(input()) if r == 1: exit() l, r = 1, 10**9 while r-l > 1: m = (l+r)//2 if check(m): l = m else: r = m