print((function (a, b) return a==b and math.sqrt(2)*a or math.sqrt(a>b and a^2-b^2 or b^2-a^2) end)(io.stdin:read("*n"), io.stdin:read("*n")))