N=int(eval(input()))

n=1



while(2*n<=N):

    n*=2



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

count=0

max=0





for a in range(1,N+1):

    while(a%2==0):

        a/=2

        count+=1

    if(max<count):

        max=count

    count=0



print((2**max))
N = int(eval(input()))
n = 1
while 2 * n <= N:
    n *= 2
print(n)

N = int(eval(input()))
count = 0
max = 0
for a in range(1, N + 1):
    while a % 2 == 0:
        a /= 2
        count += 1
    if max < count:
        max = count
    count = 0
print((2**max))

-n = 1 -while 2 * n <= N: -    n *= 2 -print(n) +count = 0 +max = 0 +for a in range(1, N + 1): +    while a % 2 == 0: +        a /= 2 +        count += 1 +    if max < count: +        max = count +    count = 0 +print((2**max))