#include <bits/stdc++.h>
using namespace std;
double n, r;
signed main() {
  scanf("%lf%lf", &n, &r);
  printf("%.10f\n", 2.0 * n * 0.5 * r * r * sin(acos(-1.0) / (2.0 * n)) /
                        sin(acos(-1.0) - (acos(-1.0) / (2.0 * n)) * 3) *
                        sin(2 * acos(-1.0) / (2.0 * n)));
  return 0;
}
