#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cassert>
#include <algorithm>

int main() {
    int _a, _b, _d, _c;
    scanf("%d%d%d%d", &_a, &_b, &_c, &_d);
    int data[3];

    data[0] = _a;
    data[1] = _b;
    data[2] = _c;
    std::sort(data, data + 3);

    double a = data[0];
    double b = data[1];
    double d = _d;

    double c = sqrt(a * a + b * b);
    assert (fabs(data[2] - c) < 1e-9);

    double m = a * (b - d) / b - d * (b + c) / b;
    double n = b * (a - d) / a - d * (a + c) / a;

    double squ = (a * b - m * n) / 2;
    printf("%0.12lf", squ);
    return 0;
}
