eolymp
bolt
Try our new interface for solving problems

Heron

\includegraphics{https://static.e-olymp.com/content/53/53de119ca21346bc658a51b2e42f1851c11e9ed9.jpg} The sides $a, b, c, d$ and the diagonal $f$ of a convex quadrilateral are given. Find the area of a quadrilateral, using the Heron’s formula that calculates the area of a triangle. \InputFile In one line five real numbers are given: $a, b, с, d, f~(0 < a, b, c, d, f \le 100)$. They are the lengths of segments as shown in the picture. \OutputFile Print the area of a quadrilateral with $4$ decimal digits.
Time limit 1 second
Memory limit 128 MiB
Input example #1
3 4 4 2 5
Output example #1
9.7997
Source SFE-2010 Variant 26