#icpc2013summerwarmingUpb. [icpc2013summer_warmingUp_b]Cans of Toys
[icpc2013summer_warmingUp_b]Cans of Toys
Description
Chocoball is a great snack, it is not only because it tastes good, but also because you can get Cans of Toys when you are lucky.
When an angel is printed inside a package of Chocoball, you are lucky. There are two types of angels: gold angels and silver angels. You can get a Can of Toys in exchange of package with a gold angel or packages with silver angels.
It is known that a gold angel is printed in probability and a silver angel is printed in probability . (Two or more angels are never printed in one package.)
In addition, it is rumored that there is a rainbow angel which appears when you are really lucky. In this case, you can get Cans of Toys at once. It is rumored that a rainbow angel is printed in probability .
Calculate the expected number of Chocoball packages one needs to buy to get at least Cans of Toys.
Input
The input file contains three real numbers , and () followed by three integers , () and ()
It is guaranteed that the expected value is lower than .
Output
Output the expected value as a decimal fraction.
The value which is accurate to within a relative value of 1E-6 will be accepted.
Sample Input
0.5 0 0
1 1 1
Sample Output
2.000000
Sample Input
0.5 0.5 0
2 1 1
Sample Output
1.500000
Sample Input
0.3 0.6 0.1
2 2 2
Sample Output
2.836000