solve :: Int -> Int
solve a
    | a == 1 = 1
    | 2 <= a && a < 4 = 2
    | 4 <= a && a < 8 = 4
    | 8 <= a && a < 16 = 8
    | 16 <= a && a < 32 = 16
    | 32 <= a && a < 64 = 32
    | otherwise = 64

main = getLine >>= (\x -> print $ solve (read x :: Int))