#include "stdio.h" #include "math.h" using namespace std; double a, b; double Abs(double x) { if (x < 0)return x*-1; return x; } int main() { scanf("%lf %lf", &a, &b); if (a != b) { a = sqrt(Abs(a*a - b*b)); } else { a *= sqrt(2.0); } printf("%.10f\n", a); return 0; }