#include <cstdio>
#include <cmath>
double r1, r2, r, ans;
int main() {
scanf("%lf%lf", &r1, &r2);
r = r1 < r2 ? r1 : r2;
double delta = (double) r / 50000000;
for(double base = delta; base <= r; base += delta) {
ans += sqrt(r1 * r1 - base * base) * sqrt(r2 * r2 - base * base);
}
printf("%.8lf\n", ans * 8 * delta + r1 * r2 * delta * 4);
return 0;
}
I2luY2x1ZGUgPGNzdGRpbz4KI2luY2x1ZGUgPGNtYXRoPgpkb3VibGUgcjEsIHIyLCByLCBhbnM7CmludCBtYWluKCkgewoJc2NhbmYoIiVsZiVsZiIsICZyMSwgJnIyKTsKCXIgPSByMSA8IHIyID8gcjEgOiByMjsKCWRvdWJsZSBkZWx0YSA9IChkb3VibGUpIHIgLyA1MDAwMDAwMDsKCWZvcihkb3VibGUgYmFzZSA9IGRlbHRhOyBiYXNlIDw9IHI7IGJhc2UgKz0gZGVsdGEpIHsKCQlhbnMgKz0gc3FydChyMSAqIHIxIC0gYmFzZSAqIGJhc2UpICogc3FydChyMiAqIHIyIC0gYmFzZSAqIGJhc2UpOwoJfQoJcHJpbnRmKCIlLjhsZlxuIiwgYW5zICogOCAqIGRlbHRhICsgcjEgKiByMiAqIGRlbHRhICogNCk7CglyZXR1cm4gMDsKfQo=