a, b, c, d = io.read("*n", "*n", "*n", "*n") io.write(string.format("%.8f\n", b + (d - b) * a / (a + c)))