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