n = int(eval(input()))

for i in range(n):

    if 2**i == n:

        print((2**i))

        break

    elif 2**i > n:

        print((2**(i-1)))

        break
n = int(eval(input()))

for i in range(n):

    if 2**i > n:

        print((2**(i-1)))

        break

    elif n == 1:

        print((1))
n = int(eval(input()))
for i in range(n):
    if 2**i == n:
        print((2**i))
        break
    elif 2**i > n:
        print((2 ** (i - 1)))
        break

n = int(eval(input()))
for i in range(n):
    if 2**i > n:
        print((2 ** (i - 1)))
        break
    elif n == 1:
        print((1))

-    if 2**i == n: -        print((2**i)) -        break -    elif 2**i > n: +    if 2**i > n: +    elif n == 1: +        print((1))