a, b = map(int, input().split()) a, b = max(a, b), min(a, b) if a == b: print(a * 2 ** 0.5) else: print((a ** 2 - b ** 2) ** 0.5)