3. Correct Diagnosis
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

A well-known medical clinic has decided to add treatment for a dangerous disease called "Inflammation of Cunning" to its list of services. However, before treating the disease, it must be diagnosed. To this end, the clinic commissioned three medical laboratories to develop test systems for performing the diagnosis. After some time, the laboratories provided their results.

It is known that all test systems use different technologies and algorithms to identify the disease. Therefore, in this problem, we will consider their diagnoses to be independent of each other (note: in practice, some dependence would still exist, but we will ignore it here).

The first test system makes a correct diagnosis with a probability of $$$p_1$$$, the second with a probability of $$$p_2$$$, and the third with a probability of $$$p_3$$$. The final decision is made based on the majority of the results. That is, if any two or all three test systems determine that the patient is sick, then the patient is considered sick; otherwise, they are not. Determine the probability that the clinic will make correct diagnoses.

Input

Three real numbers $$$p_1$$$, $$$p_2$$$, $$$p_3$$$ are given, each on a separate line ($$$0.5 \le p_1, p_2, p_3 \le 1$$$).

Output

Output a single real number — the final probability of a correct diagnosis. The absolute or relative error of the answer must not exceed $$$10^{-4}$$$.

Example
Input
0.65
0.7
0.9
Output
0.851