print((2**(len(bin(int(eval(input()))))-3)))

N = int(eval(input()))

print((2 ** (len(bin(N)[2:]) - 1)))
print((2 ** (len(bin(int(eval(input())))) - 3)))

N = int(eval(input()))
print((2 ** (len(bin(N)[2:]) - 1)))

-print((2 ** (len(bin(int(eval(input())))) - 3))) +N = int(eval(input())) +print((2 ** (len(bin(N)[2:]) - 1)))