N=int(eval(input()))



if N==1:

    print((1))

elif 2<=N<=3:

    print((2))

elif 4<=N<=7:

    print((4))

elif 8<=N<=15:

    print((8))

elif 16<=N<=31:

    print((16))

elif 32<=N<=63:

    print((32))

elif 64<=N<=100:

    print((64))
N=int(eval(input()))



C=0

L=[]



if N==1:

    print((1))



else:

    for i in range(8):

        C=2**i

        L.append(C)

        if C>N:

            print((L[-2])) 

            break
N = int(eval(input()))
if N == 1:
    print((1))
elif 2 <= N <= 3:
    print((2))
elif 4 <= N <= 7:
    print((4))
elif 8 <= N <= 15:
    print((8))
elif 16 <= N <= 31:
    print((16))
elif 32 <= N <= 63:
    print((32))
elif 64 <= N <= 100:
    print((64))

N = int(eval(input()))
C = 0
L = []
if N == 1:
    print((1))
else:
    for i in range(8):
        C = 2**i
        L.append(C)
        if C > N:
            print((L[-2]))
            break

+C = 0 +L = [] -elif 2 <= N <= 3: -    print((2)) -elif 4 <= N <= 7: -    print((4)) -elif 8 <= N <= 15: -    print((8)) -elif 16 <= N <= 31: -    print((16)) -elif 32 <= N <= 63: -    print((32)) -elif 64 <= N <= 100: -    print((64)) +else: +    for i in range(8): +        C = 2**i +        L.append(C) +        if C > N: +            print((L[-2])) +            break