import math def main(): a,b,c,d,e,f = map(int,input().split()) child = 4*(a*f-a*e) + c*c + d*d mother = 4*a*a tmp = child/mother ans = math.sqrt(tmp) return ans print(main())