#include<bits/stdc++.h>
using namespace std;
#define optimize() ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define Rep(i,n) for(ll i=0; i<int(n); ++i)
#define read(v) for (auto &it : v) cin >> it;
#define all(v) (v).begin(), (v).end()
#define rall(v) (v).rbegin(), (v).rend()
#define sz(s) s.size()
#define ff first
#define ss second
#define pii pair<int, int>
#define pll pair<ll, ll>
#define vi vector<int>
#define vl vector<ll>
#define pb push_back
#define deb(x) cout<<"For debug : "<<x<<endl;
#define min_heap priority_queue<ll,vector<ll>,greater<ll>>
typedef long long ll;
#define ld long double
#define mod 1000000007
#define endl '\n'
const int MXN=1e6+10;

void solve(){
    ld sx,sy,gx,gy;
    cin>>sx>>sy>>gx>>gy;

    // symmetric point (gx,gy): opposite y coordinates
    // if(gy>0) gy=-gy;
    ld ans=(gx*sy+sx*gy)/(sy+gy);

    cout.precision(10);
    cout<<fixed<<ans;
}

int main(){
    optimize();
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
    #endif
    int tt=1;
    // scanf("%d",&tt); cin>>tt;
    for(int i=1; i<=tt; i++){
        // cout<<"Case "<<i<<": ";
        solve();
    }
    return 0;
}
#include <iostream>
#include <algorithm>
#include <vector>
#include <iomanip>
using namespace std;

typedef long long LL;


signed main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);

  double a, b, c, d;
  cin >> a >> b >> c >> d;
  if (a > c) {
    swap(a, c);
    swap(b, d);
  }
  cout << fixed << setprecision(10) << abs(a - c) * b / (b + d) + a << endl;

  return 0;
}

