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 wczytaj_liste():
      wczytana_lista = input()
      lista_znakow = wczytana_lista.split()
      ostateczna_lista = []
      for element in lista_znakow:
          ostateczna_lista.append(int(element))
      return ostateczna_lista
  
  
  def wczytaj_rzeczywiste():
      wczytana_lista = input()
      lista_znakow = wczytana_lista.split()
      ostateczna_lista = []
      for element in lista_znakow:
          ostateczna_lista.append(float(element))
      return ostateczna_lista
  
  
  def rzuc_grosza_wiedzminowi_migusiem():
      N = wczytaj_liste()[0]
      prawdopodopienstwa = wczytaj_rzeczywiste()
      przed_rzutem = [1.0]
      for moneta in prawdopodopienstwa:
          po_rzucie = []
          for i in range(len(przed_rzutem)):
              if i > 0:
                  po_rzucie.append(
                      przed_rzutem[i] * (1 - moneta) + przed_rzutem[i - 1] * (moneta)
                  )
              else:
                  po_rzucie.append(przed_rzutem[0] * (1 - moneta))
          po_rzucie.append(przed_rzutem[-1] * moneta)
          przed_rzutem = po_rzucie
      odp = sum(przed_rzutem[N // 2 + 1 :])
      print(odp)
  
  
  rzuc_grosza_wiedzminowi_migusiem()
  
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"}]