#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const double PI = acos(-1.0);
const int MAXN = 11;
double a, b, c, d;
int main(int argc, char const *argv[]) {
  cin >> a >> b >> c >> d;
  double x = abs(a * d - b * c);
  double y =
      max(abs(a + b + c + d),
          max(abs(a - b + c - d), max(abs(a - b - c + d), abs(a + b - c - d))));
  printf("%.12f\n", y ? x / y : 0);
  return 0;
}
