{$DEFINE DEBUG}
{DEFINE DMI}
{DEFINE DO0}
{$IFDEF DEBUG}
{$B-,I+,N+,O-,Q+,R+,S+}
{$ELSE}
{$B-,I-,N+,O+,Q-,R-,S-}
{$ENDIF}
{$APPTYPE CONSOLE}
Program JurySol;
uses SysUtils;
const TaskName = 'lie';
 MinN = 1; MaxN = 100; MaxD = 1000000; eps: Extended = 1E-14;
var i, n: Integer;
 f: array [0..1, 0..MaxN] of Extended;
 p, q: array [1..MaxN] of Extended;
 chk: Extended;

BEGIN
 reset (input, TaskName + '.in');
 rewrite (output, TaskName + '.out');
{$IFDEF DMI} repeat {$ENDIF}
 assert (NOT seekeoln);
 read (n);
 assert ((n >= MinN) AND (n <= MaxN));
 assert (eoln);
 readln;
 for i := 1 to n do begin
  assert (NOT seekeoln);
  read (p[i]);
  assert ((p[i] >= 0.0) AND (p[i] <= 1.0));
  chk := p[i] * MaxD;
  assert (abs (chk - Round (chk)) <= chk * eps);
  {Warning: the former line checks only that there are no significant digits
   beyond desired precision! Trailing zeroes are allowed.}
 end;
 assert (eoln and not eof);
 readln;

 for i := 1 to n do
  q[i] := 1.0 - p[i];
 fillchar (f, sizeof (f), 0);
 f[0][0] := 1.0;
 for i := 1 to n do begin
  f[0][i] := f[0][i - 1] * p[i] + f[1][i - 1] * q[i];
  f[1][i] := f[1][i - 1] * p[i] + f[0][i - 1] * q[i];
  assert (abs (f[0][i] + f[1][i] - 1.0) < eps);
 end;
 writeln (f[0][n] + eps:0:6);
{$IFDEF DMI} until seekeof; {$ENDIF}
 assert (eof);
END.
