var i, n: Integer;
 f, p: Extended;

BEGIN
 reset (input, 'lie.in');
 rewrite (output, 'lie.out');
 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:0:6);
END.
