a,b=map(int,input().split()) s=sorted([a,b]) s1=(s[0]**2+s[1]**2)**0.5 s2=(s[1]**2-s[0]**2)**0.5 print(round(min([s1,s2]),10))