#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, b, c, d, mid, max_x, max_y, min_x, min_y, l, r;
  int i;
  l = 0;
  r = 1000000000;
  scanf("%lf %lf %lf %lf", &a, &b, &c, &d);
  for (i = 0; i < 100; ++i) {
    mid = (l + r) / 2;
    max_x = max(max((a + mid) * (d + mid), (a + mid) * (d - mid)),
                max((a - mid) * (d + mid), (a - mid) * (d - mid)));
    min_x = min(min((a + mid) * (d + mid), (a + mid) * (d - mid)),
                min((a - mid) * (d + mid), (a - mid) * (d - mid)));
    max_y = max(max((b + mid) * (c + mid), (b + mid) * (c - mid)),
                max((b - mid) * (c + mid), (b - mid) * (c - mid)));
    min_y = min(min((b + mid) * (c + mid), (b + mid) * (c - mid)),
                min((b - mid) * (c + mid), (b - mid) * (c - mid)));
    if (max_x - min_y >= 0 && min_x - max_y <= 0)
      r = mid;
    else
      l = mid;
  }
  printf("%.10lf\n", l);
  return 0;
}
