#include <bits/stdc++.h>
using namespace std;
double s[2][2], lt[2][2], rt[2][2];
double ok(double rng) {
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++)
      lt[i][j] = s[i][j] - rng, rt[i][j] = s[i][j] + rng;
  double Min_1, Max_1, Min_2, Max_2;
  Min_1 = min(min(rt[0][0] * lt[1][1], rt[0][0] * rt[1][1]),
              min(lt[0][0] * lt[1][1], lt[0][0] * rt[1][1]));
  Max_1 = max(max(rt[0][0] * lt[1][1], rt[0][0] * rt[1][1]),
              max(lt[0][0] * lt[1][1], lt[0][0] * rt[1][1]));
  Min_2 = min(min(rt[0][1] * lt[1][0], rt[0][1] * rt[1][0]),
              min(lt[0][1] * lt[1][0], lt[0][1] * rt[1][0]));
  Max_2 = max(max(rt[0][1] * lt[1][0], rt[0][1] * rt[1][0]),
              max(lt[0][1] * lt[1][0], lt[0][1] * rt[1][0]));
  if (min(Max_1, Max_2) >= max(Min_1, Min_2))
    return true;
  else
    return false;
}
int main() {
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++) scanf("%lf", &s[i][j]);
  double L = 0, R = 1E9;
  for (int i = 0; i < 500; i++) {
    double m = (L + R) / 2;
    if (ok(m))
      R = m;
    else
      L = m;
  }
  printf("%.10lf\n", R);
  return 0;
}
