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