{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';
 eps: Extended = 1E-14;
var i, n: Integer;
 f, p: Extended;

BEGIN
 reset (input, TaskName + '.in');
 rewrite (output, TaskName + '.out');
{$IFDEF DMI} repeat {$ENDIF}
 read (n);
 f := 0.5;
 for i := 1 to n do begin
  read (p);
  f := f * (p - 0.5) * 2.0;
 end;
 writeln (f + 0.5 + eps:0:6);
{$IFDEF DMI} until seekeof; {$ENDIF}
END.
