import java.util.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
double a,b,c,d,f,p1,p2,S1,S2,S;
Scanner in
= new Scanner
(System.
in); a = in.nextDouble();
b = in.nextDouble();
c = in.nextDouble();
d = in.nextDouble();
f = in.nextDouble();
p1=(a+b+f)/2;
p2=(c+d+f)/2;
S
= Math.
sqrt(p1
*(p1
-a
)*(p1
-b
)*(p1
-f
)) + Math.
sqrt(p2
*(p2
-c
)*(p2
-d
)*(p2
-f
));
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBJZGVvbmUKewoJcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBqYXZhLmxhbmcuRXhjZXB0aW9uCgl7CgkJZG91YmxlIGEsYixjLGQsZixwMSxwMixTMSxTMixTOwogICAgCSAJU2Nhbm5lciBpbiA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CgkJYSA9IGluLm5leHREb3VibGUoKTsKCQliID0gaW4ubmV4dERvdWJsZSgpOwoJCWMgPSBpbi5uZXh0RG91YmxlKCk7CgkJZCA9IGluLm5leHREb3VibGUoKTsKCQlmID0gaW4ubmV4dERvdWJsZSgpOwoJCXAxPShhK2IrZikvMjsKCQlwMj0oYytkK2YpLzI7CgkJUyA9IE1hdGguc3FydChwMSoocDEtYSkqKHAxLWIpKihwMS1mKSkgKyAgTWF0aC5zcXJ0KHAyKihwMi1jKSoocDItZCkqKHAyLWYpKTsKCQlTeXN0ZW0ub3V0LnByaW50ZigiJS40ZiIsUyk7CgkgCgl9Cn0=