import Prelude main :: IO () main = do [l, k] <- map read . words <$> getLine print $ calc l k calc :: Int -> Int -> Int calc l k = k * div l (k * 2)