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