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