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