Is there life on Mars?
- *You're lying, Kolya! There's no life on Mars! Who told you such nonsense?*
- *Petya. And Sasha told him.*
- *Well, I've never heard a truthful word from Petya! He always twists everything. And how would Sasha know?*
- *Sasha heard it from Vladimir Alekseyevich, our biology teacher.*
- *Well, Vladimir Alekseyevich can be trusted... But it's unlikely he said that. Either Sasha or Petya made it up. Or maybe you're just pulling my leg?..*
- *Hold on a minute, guys,* interrupted the approaching math teacher, Gleb Timofeyevich, *let's approach the problem formally. Suppose all the conversations—Vladimir Alekseyevich with Sasha, Sasha with Petya, and Petya with Kolya—actually took place. Let's number the guys as* **1**, **2**, and **3**. *Assume also that each of them independently transmitted the information about life on Mars correctly with probability* **p_i**, *and lied with probability* **q_i** = **1-p_i** *for* **i** = **1**, **2**, **3**. *Probabilities are real numbers from zero to one; an event with probability 0 will never happen, while an event with probability* **1** *will happen without any doubt. Knowing that Kolya then announced that there is indeed life on Mars, find the probability that Vladimir Alekseyevich actually said so based on the given* **p_i**.
- *How do we find this probability? And what does independently mean?* – the kids were puzzled.
- *Independence means that the actions of one of the guys do not affect how the others act. For example, it doesn't matter to Petya if Sasha lied - in any case, he will pass on what Sasha said correctly with probability exactly* **p_2**. *The task is not difficult, and we can consider all eight possible cases. The first case is when all the guys told the truth, and the probability of this case is* **p_1**∙**p_2**∙**p_3**. *In this case, there is undoubtedly life on Mars - we trust Vladimir Alekseyevich, and the guys conveyed his words correctly. The second case, when only Sasha lied, occurs with probability* **q_1**∙**p_2**∙**p_3**, *and in this case, there is no life on Mars. Let's go through the other six cases, each time multiplying the corresponding probabilities, and then sum up the probabilities of those cases where the teacher's words were conveyed correctly. The fact that the probabilities for individual guys in each case need to be multiplied - this is the formal definition of independence. So, in how many cases will exactly what Vladimir Alekseyevich said be conveyed?*
- *In one…*
- *Oh no. For example, if Petya and Kolya lied, and Sasha told the truth, then the truth, having been distorted twice, will reach us unchanged. In general, an even number of negations applied to a statement gives the statement itself. In our task, there are four cases with an even number of negations, and the final probability is* **p_1∙p_2∙p_3+q_1∙q_2∙p_3+q_1∙p_2∙q_3+p_1∙q_2∙q_3**.
- *So if Petya and Kolya definitely lie, and Sasha definitely tells the truth, will we hear exactly what the teacher said from Kolya?*
- *Exactly right. Now solve the problem for the general case, where there are not three guys, but n. The first one to solve it gets an A on the next test!*
Input
The input file contains an integer **n** (**1** ≤ **n** ≤ **100**). The second line contains n real numbers separated by spaces - these are the numbers **p_1**, **p_2**, ..., **p_n** (**0** ≤ **p_i** ≤ **1**). The numbers are given with no more than six decimal places.
Output
In the output file, print one real number, rounded to six decimal places - the probability of the existence of life on Mars.