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