#include<stdio.h>
#include<iostream>
#include<vector>
#include<math.h>
#include<queue>
#include<map>
#include<algorithm>
#include<string.h>
#include<functional>
#include<limits.h>
#include<stdlib.h>
#include<string>
#include<unordered_map>
#include <iomanip>
using namespace std;

#define intmax INT_MAX
#define lmax LONG_MAX
#define uintmax UINT_MAX
#define ulmax ULONG_MAX
#define llmax LLONG_MAX
#define ll long long
#define rep(i,a,N) for((i)=(a);(i)<(N);(i)++)
#define rrp(i,N,a) for((i)=(N)-1;(i)>=(a);(i)--)
#define llfor ll i,j,k
#define sc(a) cin>>a
#define pr(a) cout<<a<<endl
#define pY puts("YES")
#define pN puts("NO")
#define py puts("Yes")
#define pn puts("No")
#define pnn printf("\n")
#define sort(a) sort(a.begin(),a.end())
#define push(a,b) (a).push_back(b)
#define llvec vector<vector<ll>>
#define charvec vector<vector<char>>
#define sizeoof(a,b) (a,vector<ll>(b))
#define llpvec vector<pair<ll,ll>>
/*繰り上げ除算*/ll cei(ll x,ll y){ll ans=x/y;if(x%y!=0)ans++;return ans;}
/*最大公約数*/ll gcd(ll x,ll y){return y?gcd(y,x%y):x;}
/*最小公倍数*/ll lcm(ll x,ll y){return x/gcd(x,y)*y;}
/*n乗*/ll llpow(ll x,ll n){ll i,ans=1;rep(i,0,n)ans*=x;return ans;}
/*階乗*/ll fact(ll x){ll i,ans=1;rep(i,0,x)ans*=(x-i);return ans;}
/*nCr*/ll ncr(ll n,ll r){return fact(n)/fact(r)/fact(n-r);}
/*nPr*/ll npr(ll n,ll r){return fact(n)/fact(n-r);}
/*primejudge*/bool prime(ll a){if(a<=1)return false;ll i;for(i=2;i*i<=a;i++){if(a%i==0)return false;}return true;}
ll ans=0;llfor;///////////////////////////////////////////////////////////
int digit(int n){
   if(n < 10)  return n;
   return digit(n/10) + n%10;
}
int main(){
  double A,B,C,D;
  cin>>A>>B>>C>>D;
  double ans=(A*D+B*C)/(B+D);
  printf("%lf\n", ans);
return 0;}

#include <bits/stdc++.h>
using namespace std;
#define endl                           '\n'
#define pi                             (3.141592653589)
#define int                            long long
#define float                          double
#define inf                            1e18
#define w(x)                           int x; cin >> x; while(x--)
#define pb                             push_back
#define ppb                            pop_back
#define mp                             make_pair
#define all(x)                         (x).begin(),(x).end()
#define min3(a, b, c)                  min(c, min(a, b))
#define min4(a, b, c, d)               min(d, min(c, min(a, b)))
#define rep(i,a,b)                     for(int i = a; i < b; i++)
#define fast                           ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
#define sz(arr)                        sizeof(arr)/sizeof(arr[0])
#define ppc                            __builtin_popcount
#define ppcll                          __builtin_popcountll
#define COMPUTE_GCD(a, b) 		          std :: __gcd((a), (b))
#define COMPUTE_LCM(a, b) 		          (a * ((b) / COMPUTE_GCD(a, b)))
#define deb(x)                         cout << #x << "=" << x << endl;
#define deb2(x, y)                     cout << #x << "=" << x << " " << #y << "=" << y << endl;
#define mem1(a)                        memset(a,-1,sizeof(a))
#define mem0(a)                        memset(a,0,sizeof(a))
#define uniq(v)                        (v).erase(unique(all(v)),(v).end())


// string to integer stuuu()
// string to long long stoll()
// string.substr(position,length);
// integer to string to_string();


int32_t main()
{
    fast
    
    cout << setprecision(9);
    cout << fixed;
    
    int x1,y1,x2,y2;
    cin >> x1 >> y1 >> x2 >> y2;
    y1 = -y1;
    if(x1 == x2)
    {
        cout << x1;
        return 0;
    }
    double m = 1.0*(y2 - y1) / (x2 - x1);
    double ans = (m*x1 - y1) / m;
    
    cout << ans;




    return 0;
}