a,b=map(int,input().split()) t=(a**2 + b**2)**0.5 t2=(a ** 2 - b**2)**0.5 t3=(b**2-a ** 2 )**0.5 ans = [ i for i in [t,t2,t3] if type(i) != complex] if a == b:print(ans[0]) else:print(sorted(ans)[0])