#include <bits/stdc++.h>
using namespace std;
const int MAXN = 50700;
double pi = 4 * atan(1.0);
double pii = 2 * acos(0.0);
int main() {
  int n, r;
  cin >> n >> r;
  printf("%.10f\n", sin(pi / n) * r * r * sin(pi / n / 2.0) /
                        sin((2 * n * pi - 3 * pi) / 2.0 / n) * n);
}
