A, B, C, D, E, F = map(int, input().split()) print(((F - E) / A + C ** 2 / (2 * A) ** 2 + D ** 2 / (2 * A) ** 2) ** .5)