#include //const static double de_PI = 3.14159265358979323846; //const static int de_MOD = 1000000007; //const static int de_MAX = 999999999; //const static int de_MIN = -999999999; int main(void) { //std::ifstream inf("123.txt"); std::cin.rdbuf(inf.rdbuf()); double a = 0, b = 0; std::cin >> a >> b; double ans1 = std::sqrt(a*a + b*b); double ans2 = 0; if (a != b) { if (a < b) { ans2 = std::sqrt(b*b - a*a); } else { ans2 = std::sqrt(a*a - b*b); } } if (ans1 > ans2) { std::cout << std::fixed << std::setprecision(10) << ans2 << std::endl; } else { std::cout << std::fixed << std::setprecision(10) << ans1 << std::endl; } }