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 import math print(math.sqrt(4 * a * f - 4 * a * e + c ** 2 + d ** 2) / 2 / a)