output_description: Print the probability of having more heads than tails. The output is
  considered correct when the absolute error is not greater than 10^{-9}.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      p_1 p_2 \ldots p_N
attempt: def examA():
      N = I()
      H = LI()
      dp = [inf] * (N)
      dp[0] = 0
      for i in range(N - 1):
          dp[i + 1] = min(dp[i + 1], dp[i] + abs(H[i + 1] - H[i]))
          if i < N - 2:
              dp[i + 2] = min(dp[i + 2], dp[i] + abs(H[i + 2] - H[i]))
      ans = dp[-1]
      print(ans)
      return
  
  
  def examB():
      N, K = LI()
      H = LI()
      dp = [inf] * N
      dp[0] = 0
      for i in range(N):
          for k in range(1, K + 1):
              if i + k >= N:
                  break
              if dp[i + k] > dp[i] + abs(H[i + k] - H[i]):
                  dp[i + k] = dp[i] + abs(H[i + k] - H[i])
      ans = dp[-1]
      print(ans)
      return
  
  
  def examC():
      N = I()
      A = [0] * N
      B = [0] * N
      C = [0] * N
      for i in range(N):
          A[i], B[i], C[i] = LI()
      dp = [[0] * 3 for _ in range(N + 1)]
      for i in range(N):
          dp[i + 1][0] = max(dp[i][1], dp[i][2]) + A[i]
          dp[i + 1][1] = max(dp[i][0], dp[i][2]) + B[i]
          dp[i + 1][2] = max(dp[i][1], dp[i][0]) + C[i]
      ans = max(dp[N])
      print(ans)
      return
  
  
  def examD():
      ans = 0
      print(ans)
      return
  
  
  def examE():
      ans = 0
      print(ans)
      return
  
  
  def examF():
      # LCS
      S = SI()
      N = len(S)
      T = SI()
      M = len(T)
      dp = [[0] * (M + 1) for _ in range(N + 1)]
      for i in range(N):
          for j in range(M):
              if S[i] == T[j]:
                  dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i][j] + 1)
              dp[i + 1][j + 1] = max(dp[i + 1][j + 1], dp[i + 1][j], dp[i][j + 1])
  
      i = N
      j = M
      ans = []
      while i > 0 and j > 0:
          if dp[i][j] == dp[i - 1][j]:
              i -= 1
          elif dp[i][j] == dp[i][j - 1]:
              j -= 1
          else:
              ans.append(S[i - 1])
              i -= 1
              j -= 1
      print("".join(ans[::-1]))
      return
  
  
  def examG():
      # http://zehnpaard.hatenablog.com/entry/2018/06/26/201512
      # トポロジカルソート
      def topological_sort(n, outs, ins):
          q = deque(v1 for v1 in range(n) if ins[v1] == 0)
          res = []
          while q:
              v1 = q.popleft()
              res.append(v1)
              for v2 in outs[v1]:
                  ins[v2] -= 1
                  if ins[v2] == 0:
                      q.append(v2)
          return res
  
      N, M = LI()
      V = [[] for _ in range(N)]
      start = [0] * N
      for _ in range(M):
          x, y = LI()
          x -= 1
          y -= 1
          V[x].append(y)
          start[y] += 1
      Order = topological_sort(N, V, start)
      #    print(Order)
      dp = [0] * N
      for i in Order:
          for v in V[i]:
              dp[v] = max(dp[v], dp[i] + 1)
      ans = max(dp)
      print(ans)
      return
  
  
  def examH():
      H, W = LI()
      A = [SI() for _ in range(H)]
      dp = [[0] * W for _ in range(H)]
      dp[0][0] = 1
      for i in range(H):
          for j in range(W):
              if A[i][j] == "#":
                  continue
              dp[i][j] %= mod
              if i + 1 < H and dp[i + 1][j] != "#":
                  dp[i + 1][j] += dp[i][j]
              if j + 1 < W and dp[i][j + 1] != "#":
                  dp[i][j + 1] += dp[i][j]
      ans = dp[-1][-1]
      print(ans)
      return
  
  
  def examI():
      N = I()
      P = LFI()
      dp = [[0] * (N + 1) for _ in range(N + 1)]
      dp[0][0] = 1
      for i in range(N):
          for j in range(i + 1):
              dp[i + 1][j + 1] += dp[i][j] * P[i]
              dp[i + 1][j] += dp[i][j] * (1 - P[i])
      ans = 0
      for v in dp[N][(1 + N // 2) :]:
          ans += v
      print(ans)
      return
  
  
  import sys, copy, bisect, itertools, heapq, math
  from heapq import heappop, heappush, heapify
  from collections import Counter, defaultdict, deque
  
  
  def I():
      return int(sys.stdin.readline())
  
  
  def LI():
      return list(map(int, sys.stdin.readline().split()))
  
  
  def LFI():
      return list(map(float, sys.stdin.readline().split()))
  
  
  def LSI():
      return list(map(str, sys.stdin.readline().split()))
  
  
  def LS():
      return sys.stdin.readline().split()
  
  
  def SI():
      return sys.stdin.readline().strip()
  
  
  global mod, mod2, inf, alphabet
  mod = 10**9 + 7
  mod2 = 998244353
  inf = 10**18
  alphabet = [chr(ord("a") + i) for i in range(26)]
  
  sys.setrecursionlimit(10**7)
  
  if __name__ == "__main__":
      examI()
  
  """
  
  """
  
problem_description: Statement
  
  Let N be a positive odd number.
  
  There are N coins, numbered 1, 2, \ldots, N. For each i (1 \leq i \leq N),
  when Coin i is tossed, it comes up heads with probability p_i and tails with
  probability 1 - p_i.
  
  Taro has tossed all the N coins. Find the probability of having more heads
  than tails.
samples: [{"input": "3\n    0.30 0.60 0.80", "output": "0.612\n    \n\nThe probability of each case where we have more heads than tails is as\nfollows:\n\n  * The probability of having (Coin 1, Coin 2, Coin 3) = (Head, Head, Head) is 0.3 \u00d7 0.6 \u00d7 0.8 = 0.144;\n  * The probability of having (Coin 1, Coin 2, Coin 3) = (Tail, Head, Head) is 0.7 \u00d7 0.6 \u00d7 0.8 = 0.336;\n  * The probability of having (Coin 1, Coin 2, Coin 3) = (Head, Tail, Head) is 0.3 \u00d7 0.4 \u00d7 0.8 = 0.096;\n  * The probability of having (Coin 1, Coin 2, Coin 3) = (Head, Head, Tail) is 0.3 \u00d7 0.6 \u00d7 0.2 = 0.036.\n\nThus, the probability of having more heads than tails is 0.144 + 0.336 + 0.096\n+ 0.036 = 0.612.\n\n* * *"}, {"input": "1\n    0.50", "output": "0.5\n    \n\nOutputs such as `0.500`, `0.500000001` and `0.499999999` are also considered\ncorrect.\n\n* * *"}, {"input": "5\n    0.42 0.01 0.42 0.99 0.42", "output": "0.3821815872"}]