xa, ya = map(int, input().split()) xb, yb = map(int, input().split()) ans = ((yb - ya) / (xb + xa)) * xa + ya print(ans)