a,b = map(int,input().split()) if a==b:print(a*(2**0.5)) else: a,b=max(a,b),min(a,b) print((a*a-b*b)**0.5)