A, B, X, Y = map(int,raw_input().split(" ")) print X + X*B*1./A if X*B*1./A <= Y else Y + Y*A*1./B