import java.util.Arrays; import java.util.HashSet; import java.util.LinkedList; import java.util.Scanner; import java.util.Set; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); final int xa = sc.nextInt(); final int ya = sc.nextInt(); final int xb = sc.nextInt(); final int yb = sc.nextInt(); int min_y = -1, max_y = -1; int min_y_x = -1, max_y_x = -1; if(ya < yb){ min_y = ya; max_y = yb; min_y_x = xa; max_y_x = xb; }else{ min_y = yb; max_y = ya; min_y_x = xb; max_y_x = xa; } if(max_y == min_y){ System.out.println(min_y); }else{ System.out.printf("%.10f\n", min_y + ((max_y - min_y) * min_y_x / (double)(max_y_x + min_y_x))); } } }