n=int(eval(input()))

if n==1:

    print((1))

elif n==2 or 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))

else:

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

x=1

while True:

  if x<n:

    x=x*2

  else:break

if x>n :

  print((x//2))

else:print(x)
n = int(eval(input()))
if n == 1:
    print((1))
elif n == 2 or 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))
else:
    print((64))

n = int(eval(input()))
x = 1
while True:
    if x < n:
        x = x * 2
    else:
        break
if x > n:
    print((x // 2))
else:
    print(x)

-if n == 1: -    print((1)) -elif n == 2 or 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)) +x = 1 +while True: +    if x < n: +        x = x * 2 +    else: +        break +if x > n: +    print((x // 2)) -    print((64)) +    print(x)