Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/uchburchak-yuzi

Area of a triangle

Easy 1000 ms 64 MB 15%
Share

The sides of a triangle $a$, $b$ and $c$ are given. Find its area $S$ with Heron's formula, where $p$ is the semi-perimeter:

$$p = \frac{a + b + c}{2}, \qquad S = \sqrt{p * (p - a) * (p - b) * (p - c)}$$

A triangle with sides a, b and c

Input

One line with three positive integers: $a$, $b$ and $c$.

Output

One number — $S$, with exactly 2 digits after the decimal point (for example, 6.00).

Note

$1 \le a, b, c \le 1000$
Such a triangle exists: the sum of any two sides is greater than the third.

Examples

Input #1
3 4 5
Output #1
6.00
Input #2
2 2 2
Output #2
1.73

Sign in to submit a solution

Signing up is free and takes a minute.