x, y = map(float, input().split()) xx, yy = map(float, input().split()) xx = -xx ans = y - x * (y - yy) / (x - xx) print(ans)