#include <bits/stdc++.h>

using namespace std;

#define sim template <class c
#define ris return *this
#define dor > debug &operator<<
#define eni(x)                                                                        \
        sim > typename enable_if<sizeof dud<c>(0) x 1, debug &>::type operator<<(c i) \
        {
sim > struct rge
{
        c b, e;
};
sim > rge<c> range(c i, c j) { return rge<c>{i, j}; }
sim > auto dud(c *x) -> decltype(cerr << *x, 0);
sim > char dud(...);
struct debug
{
#ifdef LOCAL
        ~debug()
        {
                cerr << endl;
        }
        eni(!=) cerr << boolalpha << i;
        ris;
} eni(==) ris << range(begin(i), end(i));
}
sim, class b dor(pair<b, c> d)
{
        ris << "(" << d.first << ", " << d.second << ")";
}
sim dor(rge<c> d)
{
        *this << "[";
        for (auto it = d.b; it != d.e; ++it)
                *this << ", " + 2 * (it == d.b) << *it;
        ris << "]";
}
#else
        sim dor(const c &)
        {
                ris;
        }
#endif
}
;
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "

#define forn(i, n) for (int i = 0; i < int(n); i++)
#define rfor(n, i) for (ll i = (n - 1); i >= 0; --i)
#define all(V) V.begin(), V.end()
#define rall(V) V.rbegin(), V.rend()
#define len(V) (int)V.size()
#define ll long long
#define pb(n) push_back(n)
#define ld long double
#define ff first
#define ss second
#define mp make_pair
#define endl '\n'
#define M_PI 3.14159265358979323846
#define EPS 1e-7

 
void solve()
{
        ld sx, sy, dx, dy; cin >> sx >> sy >> dx >> dy;
        ld d = dx - sx;
        cout << fixed << setprecision(6) << sx + sy * (d / (sy + dy));
}

int main()
{
        ios_base::sync_with_stdio(0);
        cin.tie(0);
        cout.tie(0);
        solve();
}
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main()
{
    
        int x1,y1,x2,y2;
        cin>>x1>>y1>>x2>>y2;
        cout<<setprecision(9);
        cout<<fixed;
        if(x1==x2)
        {
            cout<<x1<<endl;
            return 0;
        }
        y1=-y1;
        double m=1.0 *(y2-y1)/(x2-x1);
        double x=(m*x1-y1)/m;
        cout<<x<<endl;

    
    return 0;
}