import math a,b=map(int,input().split()) ans=abs(a*a-b*b) if a==b: n=a*a+b*b print(math.sqrt(n)) else: print(math.sqrt(ans))