x1, y1 = [ float(v) for v in input().split() ] x2, y2 = [ float(v) for v in input().split() ] k = (y2-y1)/(x2+x1) y0 = ( k * x1 + y1 ) print(y0)