N = int(eval(input()))

if N < 2:

  print(N)

elif 2<=N<4:

  print((2))

elif 4<=N<8:

  print((4))

elif 8<=N<16:

  print((8))

elif 16<=N<32:

  print((16))

elif 32<=N<64:

  print((32))

elif 64<=N:

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

Num = [int(2**i) for i in range(7)]

if N in Num:

  print(N)

else:

  Num.append(N)

  Num = sorted(Num)

  print((2 ** (Num.index(N) - 1)))
N = int(eval(input()))
if N < 2:
    print(N)
elif 2 <= N < 4:
    print((2))
elif 4 <= N < 8:
    print((4))
elif 8 <= N < 16:
    print((8))
elif 16 <= N < 32:
    print((16))
elif 32 <= N < 64:
    print((32))
elif 64 <= N:
    print((64))

N = int(eval(input()))
Num = [int(2**i) for i in range(7)]
if N in Num:
    print(N)
else:
    Num.append(N)
    Num = sorted(Num)
    print((2 ** (Num.index(N) - 1)))

-if N < 2: +Num = [int(2**i) for i in range(7)] +if N in Num: -elif 2 <= N < 4: -    print((2)) -elif 4 <= N < 8: -    print((4)) -elif 8 <= N < 16: -    print((8)) -elif 16 <= N < 32: -    print((16)) -elif 32 <= N < 64: -    print((32)) -elif 64 <= N: -    print((64)) +else: +    Num.append(N) +    Num = sorted(Num) +    print((2 ** (Num.index(N) - 1)))