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