#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int _t = 1;
	//cin >> _t;
	while(_t--)
{
	float x1,y1,x2,y2;
	cin >> x1 >> y1 >> x2 >> y2;
	float ans = x1 + ( (x2-x1)/(1+y2/y1) );
	cout << fixed << setprecision(8) << ans << endl;
}
	return 0;
}
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <list>
#include <algorithm>
#include <stack>
#include <queue>
#include <utility>
#include <cmath>
#include <set>
#include <iomanip>
using namespace std;
typedef long long ll;


int main()
{
	double sx, sy, gx, gy;
	cin >> sx >> sy >> gx >> gy;

	gy *= -1;
	double x_diff = gx - sx;
	double y_diff = gy - sy;

	double B = sy * x_diff - sx * y_diff;

	double ans = -1 * B / y_diff;

	std::cout << std::fixed <<std::setprecision(10) << ans << std::endl;
	return (0);
}
