x1, y1 = gets.split(' ').map(&:to_i) x2, y2 = gets.split(' ').map(&:to_i) katamuki = (y2 - y1)*1.0 / (x1 + x2) puts y1 + x1*katamuki