import Control.Applicative import Text.Printf main = do [h, a, d] <- map read . words <$> getLine let max_k = (h+a-1) `div` a f :: Int -> Double f h' | h' <= 0 = 0 | otherwise = 3 / 2 * (fromIntegral l) where l = (h'+d-1) `div` d mn = minimum $ map (\t -> fromIntegral t + f (h-a*t)) [0..max_k] in printf "%.3f\n" mn