AT_icpc2013summer_warmingUp_b Cans of Toys

Description

[problemUrl]: https://atcoder.jp/contests/jag2013summer-warmingup/tasks/icpc2013summer_warmingUp_b 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 $ 1 $ package with a gold angel or $ N $ packages with silver angels. It is known that a gold angel is printed in probability $ p $ and a silver angel is printed in probability $ q $. (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 $ K $ Cans of Toys at once. It is rumored that a rainbow angel is printed in probability $ r $. Calculate the expected number of Chocoball packages one needs to buy to get at least $ M $ Cans of Toys. The input file contains three real numbers $ p $, $ q $ and $ r $ ($ 0\ \leq\ p,q,r,p+q+r\ \leq\ 1 $) followed by three integers $ N $, $ K $ ($ 1\ \leq\ N,\ K\ \leq\ 40 $) and $ M $ ($ 1\ \leq\ M\ \leq\ 10^9 $) It is guaranteed that the expected value is lower than $ 10^{12} $. Output the expected value as a decimal fraction. The value which is accurate to within a relative value of 1E-6 will be accepted. ``` 0.5 0 0 1 1 1 ``` ``` 2.000000 ``` ``` 0.5 0.5 0 2 1 1 ``` ``` 1.500000 ``` ``` 0.3 0.6 0.1 2 2 2 ``` ``` 2.836000 ```

Input Format

N/A

Output Format

N/A