#include int main() { double r, d; scanf("%lf %lf", &r, &d); double min, mid, max; min = 0; max = d; int i; for (i = 0; i < 1003; i++) { mid = (max + min) / 2; if (mid * mid + r * r < d * d) min = mid; else max = mid; } printf("%.20lf\n", (max + min) / 2); return 0; }