a,b = sorted(map(int,input().split())) print((a*a+b*b)**0.5 if a==b else (b*b-a*a)**0.5)