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