n = int(eval(input()))

for i in range(7):

    a = 2 ** i

    if a <= n:

        ans = a



print(ans)

n = int(eval(input()))

l = [1, 2, 4, 8, 16, 32, 64]

num = 0

for i in range(n+1):

    if i in l:

        num = i



print(num)
n = int(eval(input()))
for i in range(7):
    a = 2**i
    if a <= n:
        ans = a
print(ans)

n = int(eval(input()))
l = [1, 2, 4, 8, 16, 32, 64]
num = 0
for i in range(n + 1):
    if i in l:
        num = i
print(num)

-for i in range(7): -    a = 2**i -    if a <= n: -        ans = a -print(ans) +l = [1, 2, 4, 8, 16, 32, 64] +num = 0 +for i in range(n + 1): +    if i in l: +        num = i +print(num)