TYPE
TPoint = Record x, y: Real; End;
VAR
a, b, c, d: TPoint;
Function Pl(a, b, c: TPoint): Real;
Var v1, v2: TPoint;
Begin
v1.x := a.x - b.x; v1.y := a.y - b.y;
v2.x := a.x - c.x; v2.y := a.y - c.y;
Pl := Abs(v1.x * v2.y - v1.y * v2.x) / 2;
End;
BEGIN
Read(a.x, a.y, b.x, b.y);
Read(c.x, c.y, d.x, d.y);
Write(Pl(a, b, c)+Pl(a, c, d));
END.