#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int ax, ay, bx, by; cin >> ax >> ay >> bx >> by; if (ay > by) swap(ay, by), swap(ax, bx); cout << fixed << setprecision(10) << (double)(by - ay) / (ax + bx) * ax + ay << '\n'; return 0; }