import java.io.*;
import java.util.*;
import static java.lang.Math.*;

public class frame_mb {

    static final double EPS = 1e-9;

    public static void main(String[] args) throws IOException {
        Scanner in;
        PrintWriter out;

        Locale.setDefault(Locale.US);

        if (args.length != 0) {
            in = new Scanner(new File(args[0]));
            out = new PrintWriter(args[1]);
        } else {
            in = new Scanner(new File("frame.in"));
            out = new PrintWriter("frame.out");
        }

        double a = in.nextInt();
        double b = in.nextInt();
        double c = in.nextInt();
        double d = in.nextInt();

        assert (a + b - EPS > c && a + c - EPS > b && b + c - EPS > a);

        double a_b = acos((a * a + c * c - b * b) / (2 * a * c));
        double a_c = acos((a * a + b * b - c * c) / (2 * a * b));
        double a_a = acos((b * b + c * c - a * a) / (2 * b * c));

        double s_b = d / tan(a_b / 2);
        double s_a = d / tan(a_a / 2);
        double s_c = d / tan(a_c / 2);

        assert (s_b + s_c + EPS < a && s_a + s_c + EPS < b && s_a + s_b + EPS < c);

        double square = d * (a + b + c - s_a - s_b - s_c);

        out.println(square);

        out.close();
        in.close();
    }
}