A,B=map(int,input().split()) if B>A: B,A=A,B if A!=B: print((A**2-B**2)**0.5) else: print(A*(2**0.5))