pow2 = [2 ** i for i in range(0, 7)]

n = int(eval(input()))

res = max([i for i in pow2 if i <= n])

print(res)

n = int(eval(input()))

ans = 1

while ans * 2 <= n:

    ans *= 2

print(ans)

pow2 = [2**i for i in range(0, 7)]
n = int(eval(input()))
res = max([i for i in pow2 if i <= n])
print(res)

n = int(eval(input()))
ans = 1
while ans * 2 <= n:
    ans *= 2
print(ans)

-pow2 = [2**i for i in range(0, 7)] -res = max([i for i in pow2 if i <= n]) -print(res) +ans = 1 +while ans * 2 <= n: +    ans *= 2 +print(ans)