#include #include #include #include #include #include #include int main() { int a, b; std::cin >> a >> b; double c; if(a == b){ c = std::sqrt(2) * a; } else { c = a < b ? std::sqrt(b * b - a * a) : std::sqrt(a * a - b * b); } std::cout << std::fixed << std::setprecision(6) << c << std::endl; return 0; }