import Text.Printf (printf) findExpectation :: [Double] -> Double findExpectation (p : c : _) = ep ** p * ec ** c where ep = (2.0 + 3.0 + 5.0 + 7.0 + 11.0 + 13.0) / 6.0 ec = (4.0 + 6.0 + 8.0 + 9.0 + 10.0 + 12.0) / 6.0 main :: IO () main = printf "%.11f\n" . findExpectation . map read . words =<< getLine