ax, ay = map(int, input().split()) bx, by = map(int, input().split()) print((ay * bx + by * ax) / (ax + bx))