A,B,X,Y = [int(i) for i in input().split()] if X*B < Y*A: print(X/A*(A+B)) else: print(Y/B*(A+B))