n = int(eval(input()))

list_n = [2 ** i for i in range(1, 8)]

bag =[1]

for i in list_n:

    if n >= i:

        bag.append(i)

print((max(bag)))
N = int(eval(input()))

x=1

cou=0

while x <= N:

    x *= 2

    cou += 1

    

print((2**(cou-1)))
n = int(eval(input()))
list_n = [2**i for i in range(1, 8)]
bag = [1]
for i in list_n:
    if n >= i:
        bag.append(i)
print((max(bag)))

N = int(eval(input()))
x = 1
cou = 0
while x <= N:
    x *= 2
    cou += 1
print((2 ** (cou - 1)))

-n = int(eval(input())) -list_n = [2**i for i in range(1, 8)] -bag = [1] -for i in list_n: -    if n >= i: -        bag.append(i) -print((max(bag))) +N = int(eval(input())) +x = 1 +cou = 0 +while x <= N: +    x *= 2 +    cou += 1 +print((2 ** (cou - 1)))