from math import * a, b, c, d, e, f = map(int, input().split()) if a < 0: a, b, c, d, e, f = -a, -b, -c, -d, -e, -f print(sqrt(f - e + (c ** 2 + d ** 2)/(4 * a)) * sqrt(1/a))