xa, ya = map(float, input().split()) xb, yb = map(float, input().split()) xa *= -1 print(ya - xa * ((yb - ya) / (xb - xa)))