#include <stdio.h>
#include <math.h>

int main() {
    double s, p, r;
    int a, b, c, d;

    freopen("frame.in", "r", stdin);
    freopen("frame.out", "w", stdout);

    scanf("%d %d %d %d", &a, &b, &c, &d);
    p = (a + b + c) * 0.5;
    s = sqrt(p * (p - a) * (p - b) * (p - c));
    r = s / p;

    printf("%.6lf\n", s - (r - d) * p * (r - d) / r);
    return 0;
}
