xa, ya = map(int, input().split()) xb, yb = map(int, input().split()) if ya == yb: yp = ya elif xa == xb: yp = (ya + yb)/2 else: xb = -xb m = (yb-ya)/(xb-xa) yp = m * (-xb) + yb print(yp)