import bisect



two_squares = [1]



temp = 1

while temp <= 100:

    temp *= 2

    two_squares.append(temp)



N = int(eval(input()))



result = bisect.bisect_right(two_squares, N)



print((two_squares[result - 1]))
N = int(eval(input()))



result = 0

temp = 1

while temp <= 100:

    if temp <= N:

        result = temp

    temp *= 2



print(result)
import bisect

two_squares = [1]
temp = 1
while temp <= 100:
    temp *= 2
    two_squares.append(temp)
N = int(eval(input()))
result = bisect.bisect_right(two_squares, N)
print((two_squares[result - 1]))

N = int(eval(input()))
result = 0
temp = 1
while temp <= 100:
    if temp <= N:
        result = temp
    temp *= 2
print(result)

-import bisect - -two_squares = [1] +N = int(eval(input())) +result = 0 +    if temp <= N: +        result = temp -    two_squares.append(temp) -N = int(eval(input())) -result = bisect.bisect_right(two_squares, N) -print((two_squares[result - 1])) +print(result)