import java.util.Scanner; public class Main { @SuppressWarnings("resource") public static void main(String args[]) { Scanner scanner = new Scanner(System.in); int xa=scanner.nextInt(); int ya=scanner.nextInt(); int xb=scanner.nextInt(); int yb=scanner.nextInt(); xa*=-1; double a=(double)(yb-ya)/(xb-xa); double ans=ya-a*xa; System.out.println(ans); } }