a,b=map(int,input().split()) print(round(a*(2**.5) if a==b else abs(a*a-b*b)**.5,10))