x1,y1=map(int,input().split()) x2,y2=map(int,input().split()) x2*=-1 a = (y2 - y1) / (x2 - x1) b = y1 - a * x1 print(b)