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