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