#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int,int>;
 
int main() {
	double sx, sy, gx, gy;
	cin >> sx >> sy >> gx >> gy;
	double ans = (gx - sx)*sy/(sy+gy) + sx;
	printf("%f06\n", ans);

    return 0;
}

#include <iostream>
#include <iomanip>

using namespace std;
  
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(16);
  double sx, sy, gx, gy;
  cin >> sx >> sy >> gx >> gy;
  if (sx > gx) {
    swap(sx, gx);
    swap(sy, gy);
  }  
  sy = -sy;
  double dy = gy - sy, dx = gx - sx;
  auto check = [&](double x) {
    return dy * (sx - x) >= dx * sy;
  };
  double l = sx, r = gx, x;
  for (int it = 0; it < 50; it++) {
    check(x = (l + r) * 0.5) ? l = x : r = x;
  }
  cout << l << '\n';
  return 0;
}
