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