A, B, C, D, E, F = map(int, input().split()) # x^2 + cx + y^2 + dy = f に直す C /= A D /= A F = (F - E) / A print((F + C ** 2 / 4 + D ** 2 / 4) ** .5)