#include #include #include using ldouble = long double; void solve() { ldouble a, b; std::cin >> a >> b; ldouble c; if (a == b) { c = std::sqrt(2L) * a; } else { if (a > b) std::swap(a, b); c = std::sqrt(b * b - a * a); } std::cout << std::fixed << std::setprecision(10) << c << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }