a, b = map(int, input().split()) c, d = map(int, input().split()) y = (d-b)/(c+a)*a+b print(y)