var i, n: longint;
a: array[1..10] of real;
amin, amax, p: real;
begin
assign(output, 'output.txt');
rewrite(output);
readln(n);
if n = 2 then
begin
writeln('0 ');
close(output);
end
else
begin
p := 1;
for i := 1 to n do
read(a[i]);
amin := a[1];
for i := 1 to n do
if amin >= abs(a[i]) then
amin := a[i];
amax := a[1];
for i := 1 to n do
begin
if amax <= a[i] then<br> amax := a[i];
end;
if n > 2 then
for i := 2 to n - 1 do
p := p * a[i];
write(p:0:3);
close(output);
end;
end.