xa, ya = map(int, input().split()) xb, yb = map(int, input().split()) xa = -xa a = (yb-ya)/(xb-xa) b = a*abs(xa) + ya print(b)