#include<iostream>
#include<iomanip>

using namespace std;

int sx,sy,gx,gy;

int main()
{
    cin >> sx >> sy >> gx >> gy;
    
    double d = (gx-sx)/(double)(-gy-sy);
           
    cout << fixed << setprecision(10) <<  - d * sy + sx << endl;
    
    
    return 0;
}
#include <bits/stdc++.h>

using std::cin;
using std::cout;
using std::min;

int f[102][2];

int main() {
	int a, b, x, y;
	cin >> a >> b >> x >> y;
	
	f[a][1] = x;
	for (int i = a + 1; i <= 100; ++i) {
	    f[i][0] = min(f[i - 1][0] + y, f[i-1][1] + x);
	    f[i][1] = min(f[i - 1][1] + y, f[i][0] + x);
    }
    
    for (int i = a - 1; i >= 1; --i) {
		f[i][1] = min(f[i + 1][1] + y, f[i + 1][0] + x);
		f[i][0] = min(f[i + 1][0] + y, f[i][1] + x);
    }
	
	cout << f[b][1] << '\n';
	
	return 0;
}