#include <bits/stdc++.h>
using namespace std;
int main() {
  double a, b, c, d;
  cin >> a >> b >> c >> d;
  double ans;
  if (fabs(a * d - b * c) < 1e-6)
    ans = 0;
  else {
    ans = fabs((a * d - b * c) / (a + b + c + d));
    ans = min(ans, fabs((a * d - b * c) / (a + d - b - c)));
    ans = min(ans, fabs((a * d - b * c) / (a - d - b + c)));
    ans = min(ans, fabs((a * d - b * c) / (a - d + b - c)));
  }
  printf("%.9f\n", ans);
  return 0;
}
