ans = 10 ** 9 while True: print(ans) a = int(input()) if a == 0: a //= 2 else: exit()