#306saitama xa,ya=(int(i) for i in input().split()) xb,yb=(int(i) for i in input().split()) xb*=-1 xa-=xb ya-=yb xa=float(xa) ya=float(ya) a=ya/xa a*=xa ya+=a print(ya)