a, b, c, d, e, f = [int(_) for _ in input().split()] c /= a d /= a e -= f e /= a p = -c / 2 q = -d / 2 r = (p**2 + q**2 - e)**0.5 print(r)