#include #include #include #include #include #include #include #include #include #include using namespace std; //#define __int64 long long #define long __int64 #define REP(i,a,b) for(int i=a;i> a >> b >> c >> d; if(a * d == b * c){ ans = c + d; }else if(a * d > b * c){ ans = c + (double(c) * b / a); }else{ ans = d + (double(d) * a / b); } cout.precision(13); cout << fixed << ans << endl; return 0; }