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