#include <bits/stdc++.h>
using namespace std;
pair<double, double> p(double a, double b, double x) {
  double t1 = (a - x) * (b - x);
  double t2 = (a - x) * (b + x);
  double t3 = (a + x) * (b - x);
  double t4 = (a + x) * (b + x);
  return minmax({t1, t2, t3, t4});
}
int main() {
  ios_base::sync_with_stdio(0);
  double a, b, c, d;
  cin >> a >> b >> c >> d;
  double lo = 0, hi = 1e12;
  for (int i = 0; i < 500; i++) {
    double mid = (lo + hi) / 2;
    pair<double, double> p1 = p(a, d, mid);
    pair<double, double> p2 = p(b, c, mid);
    if (p1.second < p2.first or p2.second < p1.first)
      lo = mid;
    else
      hi = mid;
  }
  cout << setprecision(12) << lo << '\n';
  return 0;
}
