import Control.Applicative

main = do
    ns <- map read.words <$> getLine
    putStrLn.show $ answer ns

answer [n] = last . filter (\v -> mod v n == 0 && mod v 2 == 0) $ [2*n,2*n-(max n 2)..max n 2]