from math import sqrt a,b=map(int,input().split()) if a==b: print(sqrt(2)*a) else: x,y=min(a,b),max(a,b) print(sqrt(y*y-x*x))