for i in range(30): if i == 0: print(1000000000) x = 1000000000 else: r = int(input()) if r == 0: x //= 2 print(x) elif r == 1: exit() else: exit()