import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in)); try { String[] line1 = stdReader.readLine().split(" "); String[] line2 = stdReader.readLine().split(" "); int x1 = Integer.parseInt(line1[0]); int y1 = Integer.parseInt(line1[1]); int x2 = -1*Integer.parseInt(line2[0]); int y2 = Integer.parseInt(line2[1]); double slope = (double)(y2-y1) / (x2-x1); double intercept = y2-slope*x2; System.out.println(intercept); } catch (IOException e) { e.printStackTrace(); } } }