import Control.Applicative ((<$>)) import Text.Printf (printf) solve :: RealFloat a => a -> a -> a solve a b | c /= d = sqrt $ d * d - c * c | otherwise = sqrt $ c * c + d * d where c = min a b d = max a b main :: IO () main = do [a, b] <- fmap read . words <$> getLine :: IO [Double] printf "%.12f\n" $ solve a b