#include using namespace std; int main() { int t1, k1, t2, k2; cin >> t1 >> k1 >> t2 >> k2; cout << 1.0 / ((k1 + 0.0) / t1 + (k2 + 0.0) / t2) << "\n"; }