#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5010;
const int mod = 100;
const int INF = 0x3f3f3f3f;
const double pi = acos(-1.0);
const double eps = 1e-4;
int main() {
  int n, r;
  cin >> n >> r;
  printf("%.20f\n",
         n * sin(pi / (2 * n)) / sin(3 * pi / (2 * n)) * r * r * sin(pi / n));
  return 0;
}
