import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); double a = sc.nextInt(); double b = sc.nextInt(); double c = sc.nextInt(); double d = sc.nextInt(); double e = sc.nextInt(); double f = sc.nextInt(); f += c * c / 4 / a / a + d * d / 4 / b / b - e; System.out.println(Math.sqrt(f)); } }