{Bignum precise solution, linear dynamic programming algorithm}
{$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';
 MaxP = 1000000; MaxQ = 6; MaxD = 1003; Base = 10; eps: Extended = 1E-14;
type Bignum = array [0..MaxD] of Integer;
var i, j, k, n, s, t: Integer;
 f: Bignum;
 p: Extended;

BEGIN
 reset (input, TaskName + '.in');
 rewrite (output, TaskName + '.out');
{$IFDEF DMI} repeat {$ENDIF}
 read (n);
 fillchar (f, sizeof (f), 0);
 f[0] := 6;
 f[1] := 0;
 f[2] := 0;
 f[3] := 0;
 f[4] := 0;
 f[5] := 5;
 f[6] := 0;
 s := 1;

 for i := 1 to n do begin
  read (p);
  j := Round ((p - 0.5) * MaxP);
  if j < 0 then begin
   s := -s;
   j := -j;
  end;
  j := j shl 1;
  t := 0;
  for k := 1 to f[0] do begin
   t := t + f[k] * j;
   f[k] := t mod Base;
   t := t div Base;
  end;
  while t > 0 do begin
   inc (f[0]);
   f[f[0]] := t mod Base;
   t := t div Base;
  end;
{$IFDEF DO0}
  if s = 1 then write ('+') else write ('-');
  write (f[(i + 1) * MaxQ], '.');
  for k := (i + 1) * MaxQ - 1 downto 1 do write (f[k]);
  writeln;
{$ENDIF}
 end;
 f[0] := (n + 1) * MaxQ;

 if s = -1 then begin
  f[f[0] - 1] := (Base shr 1) - f[f[0] - 1] - 1;
  for i := f[0] - 2 downto 1 do
   f[i] := Base - f[i] - 1;
  i := 1;
  while (i <= f[0]) AND (f[i] = Base - 1) do begin
   f[i] := 0;
   inc (i);
  end;
  if f[0] < i then inc (f[0]);
  inc (f[i]);
 end else begin
  inc (f[f[0] - 1], Base shr 1);
  if f[f[0] - 1] >= Base then begin
   dec (f[f[0] - 1], Base);
   inc (f[f[0]]);
  end;
 end;
 
 assert (f[0] > MaxQ + 1);
 if f[f[0] - MaxQ - 1] >= (Base shr 1) then begin
  i := f[0] - MaxQ;
  while (i <= f[0]) AND (f[i] = Base - 1) do begin
   f[i] := 0;
   inc (i);
  end;
  if f[0] < i then inc (f[0]);
  inc (f[i]);
 end;
 write (f[f[0]], '.');
 for i := 1 to MaxQ do
  write (f[f[0] - i]);
 writeln;
{$IFDEF DMI} until seekeof; {$ENDIF}
END.
