a, b, c, d, e, f = map(int, input().split()) r = (4 * f - 4 * e + c ** 2 / a + d ** 2 / b) ** 0.5 * 0.5 print(r)