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