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



getResult :: [Int] -> Int -> Int
getResult nums count = case filter even $ map (`div` 2) nums of
  a | null a    -> count
    | otherwise -> getResult a count + 1

main :: IO ()
main = do
  n <- readLn
  print $ (^) 2 (getResult (filter even [1 .. n]) 1)