#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
using ll = long long;

int main() {
    double r, d;
    cin >> r >> d;

    printf("%.8f\n", sqrt(d * d - r * r));

    return 0;
}