A,B,X,Y = map(int,input().split()) x = (A * Y) / B y = (B * X) / A if y <= Y: print(X + y) else: print(Y + x)