n = int(eval(input()))

cnt = 1

while cnt <= n:

    cnt *= 2

print((cnt//2))
n = int(eval(input()))

t = 1

while t <= n:

    t*=2

print((t//2))
n = int(eval(input()))
cnt = 1
while cnt <= n:
    cnt *= 2
print((cnt // 2))

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

-cnt = 1 -while cnt <= n: -    cnt *= 2 -print((cnt // 2)) +t = 1 +while t <= n: +    t *= 2 +print((t // 2))