import math._ object Main { def main(args: Array[String]) { val sc = new java.util.Scanner(System.in) val x1, y1, x2, y2 = sc.nextDouble val x = x1 + x2 val y = y2 - y1 val q = x1 * y / x println(y1 + q) } }