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