-- Question B

import Data.List
import Control.Applicative
import Control.Monad

main = do
  n <- readLn ::IO Int
  putStrLn $ show ( check n)

check :: Int -> Int
check n 
  | n == 1  = 1
  | n < 4 = 2
  | n < 8 = 4
  | n < 16 = 8
  | n < 32 = 16
  | n < 64 = 32
  | otherwise =64  
