[A,B,X,Y] = map(int,raw_input().split()) print 1.0*Y*(A+B)/B if X*B>Y*A else 1.0*X*(A+B)/A