#include <bits/stdc++.h>

#define ll             long long
#define sf             scanf
#define pf             printf
#define nl             printf("\n")
#define pb             push_back
#define TEST           int Test;cin>>Test;for(int _t=1;_t<=Test;_t++)

using namespace std;

int main()
{
	int a,b,c,d;
	sf("%d %d %d %d",&a,&b,&c,&d);
	double theta = (atan((double)(c-a)/(double)(b+d)));
	double x = (b*tan(theta))+a;
	pf("%lf\n",x);
	return 0;
}

#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<vector>
#include<utility>
#include<tuple>
#include<map>
#include<queue>
#include<stack>
#include<deque>
#include<bitset>
#include<math.h>
using namespace std;
using ll = int64_t;
using Graph = vector<vector<int> >;
const ll M = 1000000007;

int main(){
    double sx,sy,gx,gy;
    cin >> sx >> sy >> gx >> gy;
    gy=-gy;
    double ans=sx-(sy*(gx-sx)/(gy-sy));
    cout << fixed << setprecision(8) << ans << endl;
}