import Control.Monad (replicateM, unless)
import Control.Applicative ((<$>))

surfaceArea :: Double -> Double -> Double
surfaceArea x h = (*) x $ (+) x $ sqrt $ x * x + 4 * h * h

main :: IO ()
main = do
    [x, h] <- replicateM 2 $ read <$> getLine
    unless (x == 0.0 && h == 0.0) $ do
        putStrLn $ show $ surfaceArea x h
        main