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