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