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