You have several peanuts inside a bag. Before you start eating some of them, you decide that you will eat exactly peanuts in total. Repeatedly, you will take a peanut at random from the bag, and eat it. However, it happens that some of the peanuts are not complete, but just a half-peanut. Therefore, it is possible that you will not eat exactly peanuts.
For instance, suppose that the bag has complete peanuts, half-peanuts, and that you want to eat exactly one peanut (that is, ). In this case, with probability you will eat the complete peanut, and stop. Otherwise, after eating a half-peanut, you will eat another peanut, which can be the remaining half-peanut (this would be a success, since you would have eaten peanuts) or the complete peanut (this would be a failure, bacause you would have eaten peanuts). Altogether, the probability of success is .
Given , and , can you compute the probability of success?
Input consists of several cases, with only integer numbers, each one with , and . Assume , , and .
For every case, print with four digits after the decimal point the probability of eating exactly peanuts when you are given a bag with complete peanuts and half-peanuts.
The expected solution has cost
.
The given bounds for
,
and
are rather small, in order to reduce the magnitude of numerical errors.
Even so, use the type long double and try hard to avoid
underflows and overflows. Good luck!
Input
1 2 1 3 0 3 0 6 3 2 1 2 1000 2000 1000
Output
0.6667 1.0000 1.0000 0.3333 0.7500