def getlist(): return list(map(int, input().split())) a, b = getlist() print(min((a ** 2 + b ** 2) ** 0.5, abs(a ** 2 - b ** 2) ** 0.5))