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