#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define MAX_MOD 1000000007 #define REP(i,n) for(int i = 0;i < n;++i) #define LONGINF 1000000000000000000 int main() { double a[2]; cin >> a[0] >> a[1]; if (a[0] < a[1]) swap(a[0], a[1]); double top = a[0], bot = 0; a[0] *= a[0]; a[1] *= a[1]; for (int i = 0;i < 100000;++i) { double mid = (top + bot) / 2; double hoge = mid; mid *= mid; if (a[1] + mid < a[0]) { bot = hoge; } else { top = hoge; } } if (a[0] != a[1]) { cout << fixed << setprecision(30) << bot; } else { cout << fixed << setprecision(30) << sqrt(a[0] + a[1]) << endl; } return 0; }