a, b = [float(v) for v in input().split()] print(abs(a ** 2 - b ** 2) ** 0.5 if a != b else (a ** 2 + b ** 2) ** 0.5)