program abc;
var a,b,c,d:integer;
p,s,min:real;
begin
readln(a,b,c,d);
min:=a*b*c*d;
p:=(a+d+c)/2;
s:=sqrt((p-a)*(p-d)*(p-c)*p);
if s<min then min:=s;
p:=(a+b+c)/2;
s:=sqrt((p-a)*(p-b)*(p-c)*p);
p:=(b+c+d)/2;
s:=sqrt((p-b)*(p-c)*(p-d)*p);
p:=(b+a+d)/2;
s:=sqrt((p-a)*(p-b)*(p-d)*p);
writeln(min);
end.
program abc;
var a,b,c,d:integer;
p,s,min:real;
begin
readln(a,b,c,d);
min:=a*b*c*d;
p:=(a+d+c)/2;
s:=sqrt((p-a)*(p-d)*(p-c)*p);
if s<min then min:=s;
p:=(a+b+c)/2;
s:=sqrt((p-a)*(p-b)*(p-c)*p);
if s<min then min:=s;
p:=(b+c+d)/2;
s:=sqrt((p-b)*(p-c)*(p-d)*p);
if s<min then min:=s;
p:=(b+a+d)/2;
s:=sqrt((p-a)*(p-b)*(p-d)*p);
if s<min then min:=s;
writeln(min);
end.