object Main extends App {

  import scala.io.StdIn._

  val n = readLine.trim.toInt
  val probs = readLine.trim.split(' ').map(_.toDouble)
  println(cal(probs))
  def cal(prob: Array[Double]): Double = {
    val memo = Array.tabulate(prob.length + 1){rest ⇒ Array.tabulate(rest + 1){_ ⇒ None:Option[Double]}}
    def sub(rest: Int, sur: Int): Double = {
      if (rest < sur) 0d
      else if (rest == 0) 1d
      else if (sur == 0) 1d
      else {
        memo(rest)(sur) match {
          case Some(r) ⇒ r
          case None ⇒
            (prob(rest - 1) * sub(rest - 1, sur - 1) + (1 - prob(rest - 1)) * sub(rest - 1, sur)).also{r ⇒ memo(rest)(sur) = Some(r)}
        }
      }
    }
    for (i ← prob.indices by 20) {
      for (j ← 0 until i by 100){
        sub(i, j)
      }
    }
    sub(prob.length, prob.length / 2 + 1)
  }
  implicit class Extend[T](value: T){
    def also(func: T ⇒ Unit): T = {func(value); value}
    def let[A](func: T ⇒ A): A = func(value)
  }
}