import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); double xa = (-1) * sc.nextDouble(); double ya = sc.nextDouble(); double xb = sc.nextDouble(); double yb = sc.nextDouble(); double ans = (-1) * xa * (yb - ya) * (1 / (xb - xa)) + ya; System.out.println(ans); } }