program PLOCHAD_1;
var AB, BC, CD, AD, BD, S1, S, a, b, c, p:real;
procedure GERON_1;
begin
p := (a + b + c)/2;
S := sqrt (p*(p - a)*(p - b)*(p - c));
end;
begin {*ОСНОВНАЯ ПРОГРАММА*}
read (AB, BC, CD, AD, AC);
a := AB; b := AD; c := BD; GERON_1; S1:= S;
a := BC; b := CD; c := BD; GERON_1; S1:= S1 + S;
write (S1);
end.
var AB, BC, CD, AD, BD, S1, S, a, b, c, p:real;
procedure GERON_1;
begin
p := (a + b + c)/2;
S := sqrt (p*(p - a)*(p - b)*(p - c));
end;
begin {*ОСНОВНАЯ ПРОГРАММА*}
read (AB, BC, CD, AD, AC);
a := AB; b := AD; c := BD; GERON_1; S1:= S;
a := BC; b := CD; c := BD; GERON_1; S1:= S1 + S;
write (S1);
end.