{Problem B}
{$APPTYPE console}
var
  n : byte;
  p : array [1..100] of extended;
  i : byte;
  a : array [0..100,1..2] of extended;
begin
  Assign ( input , 'lie.in' );
  Reset ( input );
  Assign ( output , 'lie.out' );
  Rewrite ( output );
  Read ( n );
  for i:=1 to n do read ( p[i] );
  a[0][1]:=1;
  a[0][2]:=0;
  for i:=1 to n do begin
    a[i][1]:=a[i-1][1]*p[i]+a[i-1][2]*(1-p[i]);
    a[i][2]:=a[i-1][2]*p[i]+a[i-1][1]*(1-p[i]);
  end;
  writeln ( a[n][1]:0:6 );
  close ( input );
  close ( output );
end.
 