from decimal import Decimal, getcontext, ROUND_HALF_UP # Set precision and rounding mode to handle accurate decimal operations getcontext().prec = 20 getcontext().rounding = ROUND_HALF_UP a, b = map(int, input().split()) if a != b: c = max(a, b) d = min(a, b) # Calculate c² - d² using Decimal for high precision cs = Decimal(c) ds = Decimal(d) res = (cs**2 - ds**2).sqrt() else: # Calculate hypotenuse when both sides are equal res = (Decimal(a)**2 * 2).sqrt() # Format the result to 10 decimal places formatted_res = res.quantize(Decimal('1.0000000000')) print(f"{formatted_res:.10f}")