import Control.Applicative

solver ::Int->Int->Int
solver acc n
    |2*acc > n = acc
    |otherwise = solver (2*acc) n
 
main :: IO ()
main = do
    a <- readLn :: IO Int
    putStrLn $ show $ solver 1 a

