#include <bits/stdc++.h>
using namespace std;
pair<double, double> Range(double a, double b, double m) {
  double v1, v2, v3, v4;
  v1 = (a + m) * (b + m);
  v2 = (a - m) * (b + m);
  v3 = (a + m) * (b - m);
  v4 = (a - m) * (b - m);
  return minmax({v1, v2, v3, v4});
}
int main() {
  int a, b;
  cin >> a >> b;
  int c, d;
  cin >> c >> d;
  double l = 0, r = 1e9 + 7;
  for (int i = 0; i <= 1000; i++) {
    double m = (l + r);
    m *= .5;
    auto p1 = Range(a, d, m);
    auto p2 = Range(b, c, m);
    if (p1.second < p2.first or p2.second < p1.first)
      l = m;
    else
      r = m;
  }
  cout << setprecision(12) << l;
}
