A, B, X, Y = map(float, raw_input().split()) if X * B / A <= Y: print "%.10f" % (X + X * B / A) elif Y * A / B <= X: print "%.10f" % (Y + Y * A / B)