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