x = (10**9)//2 while True: print(x) r = int(input()) if r == 1: exit() if x % 2 == 0: x //= 2 else: x = (x + 1) // 2