#include #include using namespace std; int main(){ int a,b,c,d;cin>>a>>b>>c>>d; cout << fixed << setprecision(10) << (double)min(b,d)+(double)abs(d-b)*min(a,c)/(a+c) << endl; }