a, b = map(int, input().split()) if a < b : a, b = b, a c = (a * a - b * b)**0.5 if c == 0: print(a * (2**0.5)) else: print(c)