x1, y1 = gets.split.map(&:to_i)
x2, y2 = gets.split.map(&:to_i)
x2 = -x2
slop = (y2 - y1).to_f / (x2 - x1).to_f
b = y1 - slop * x1
puts b