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

int main()
{
  freopen("frame.in", "rt", stdin);
  freopen("frame.out", "wt", stdout);

  double a, b, c, d;
  scanf("%lf%lf%lf%lf", &a, &b, &c, &d);
  double za = acos((b * b + c * c - a * a) / 2 / b / c) / 2,
    zb = acos((c * c + a * a - b * b) / 2 / c / a) / 2,
    zc = acos((a * a + b * b - c * c) / 2 / a / b) / 2;
  printf("%.16lf\n", d * (a + b + c - d * (
    cos(za) / sin(zb) / sin(zc) +
    cos(zb) / sin(zc) / sin(za) +
    cos(zc) / sin(za) / sin(zb)) / 2));

  return 0;
}
