#include <bits/stdc++.h>
using namespace std;
typedef double DB;
DB r1, r2, r, r12, r22;
/*{ self-adjasting simpson*/
DB func(DB x) {
x = x * x;
return sqrt(r12 - x) * sqrt(r22 - x);
}
DB simpson(DB a, DB b) {
return (func(a) + 4 * func(a + (b - a) / 2) + func(b)) * (b - a) / 6;
}
DB asr(DB a, DB b, DB eps, DB A) {
DB c = a + (b - a) / 2;
DB l = simpson(a, c), r = simpson(c, b);
if(fabs(l + r - A) <= eps * 15) return l + r + (l + r - A) / 15.0;
return asr(a, c, eps / 2, l) + asr(c, b, eps / 2, r);
}
DB asr(DB a, DB b, DB eps) {
return asr(a, b, eps, simpson(a, b));
}
/*} end*/
int main() {
scanf("%lf%lf", &r1, &r2);
r12 = r1 * r1, r22 = r2 * r2;
r = min(r1, r2);
printf("%.10lf\n", asr(0.00, r, 1e-8) * 8);
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnR5cGVkZWYgZG91YmxlIERCOwpEQiByMSwgcjIsIHIsIHIxMiwgcjIyOwoKLyp7IHNlbGYtYWRqYXN0aW5nIHNpbXBzb24qLwpEQiBmdW5jKERCIHgpIHsKCXggPSB4ICogeDsKCXJldHVybiBzcXJ0KHIxMiAtIHgpICogc3FydChyMjIgLSB4KTsKfQpEQiBzaW1wc29uKERCIGEsIERCIGIpIHsKCXJldHVybiAoZnVuYyhhKSArIDQgKiBmdW5jKGEgKyAoYiAtIGEpIC8gMikgKyBmdW5jKGIpKSAqIChiIC0gYSkgLyA2Owp9CkRCIGFzcihEQiBhLCBEQiBiLCBEQiBlcHMsIERCIEEpIHsKCURCIGMgPSBhICsgKGIgLSBhKSAvIDI7CglEQiBsID0gc2ltcHNvbihhLCBjKSwgciA9IHNpbXBzb24oYywgYik7CglpZihmYWJzKGwgKyByIC0gQSkgPD0gZXBzICogMTUpIHJldHVybiBsICsgciArIChsICsgciAtIEEpIC8gMTUuMDsKCXJldHVybiBhc3IoYSwgYywgZXBzIC8gMiwgbCkgKyBhc3IoYywgYiwgZXBzIC8gMiwgcik7Cn0KREIgYXNyKERCIGEsIERCIGIsIERCIGVwcykgewoJcmV0dXJuIGFzcihhLCBiLCBlcHMsIHNpbXBzb24oYSwgYikpOwp9Ci8qfSBlbmQqLwoKCmludCBtYWluKCkgewoJc2NhbmYoIiVsZiVsZiIsICZyMSwgJnIyKTsKCXIxMiA9IHIxICogcjEsIHIyMiA9IHIyICogcjI7CglyID0gbWluKHIxLCByMik7CglwcmludGYoIiUuMTBsZlxuIiwgYXNyKDAuMDAsIHIsIDFlLTgpICogOCk7CglyZXR1cm4gMDsKfQoK