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