#include <bits/stdc++.h>
using namespace std;

int main()
{
	double r, d;
	cin >> r >> d;
	cout << fixed << setprecision(20) << sqrt(d * d - r * r) << endl;
	return 0;
}