import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines A,B,X,Y = map(int,read().split()) if A * Y > B * X: answer = X * (A+B) / A else: answer = Y * (A+B) / B print(answer)