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