a, b = map(int, input().split()) a, b = [a, b] if a > b else [b, a] c = (a*a-b*b)**0.5 if c==0: (a*a+b*b)**0.5 print(c)