#include <bits/stdc++.h>
using namespace std;
int n, m, i, j, a, b, c, d;
double ub, lb, mid, maxa, maxb, mina, minb;
int main() {
  scanf("%d%d%d%d", &a, &b, &c, &d);
  lb = 0;
  ub = 1e10;
  for (i = 1; i <= 10000; i++) {
    mid = (lb + ub) * 0.5;
    maxa = maxb = -1e18;
    mina = minb = 1e18;
    maxa = max(max((a - mid) * (d - mid), (a - mid) * (d + mid)),
               max((a + mid) * (d - mid), (a + mid) * (d + mid)));
    mina = min(min((a - mid) * (d - mid), (a - mid) * (d + mid)),
               min((a + mid) * (d - mid), (a + mid) * (d + mid)));
    maxb = max(max((b - mid) * (c - mid), (b - mid) * (c + mid)),
               max((b + mid) * (c - mid), (b + mid) * (c + mid)));
    minb = min(min((b - mid) * (c - mid), (b - mid) * (c + mid)),
               min((b + mid) * (c - mid), (b + mid) * (c + mid)));
    if (maxa > minb && maxb > mina)
      ub = mid;
    else
      lb = mid;
  }
  printf("%.10lf\n", ub);
}
