#include using namespace std; typedef long long ll; int main() { double r, d; cin >> r >> d; double ans = sqrt(d * d - r * r); cout << fixed << setprecision(10) << ans << '\n'; return 0; }