#include <bits/stdc++.h>
using namespace std;
const double PI = 3.1415926535;
double cot(double x) { return cos(x) / sin(x); }
int main() {
  double r, n;
  cin >> n >> r;
  cout << fixed << setprecision(9)
       << n * r * r * sin(PI / n) / (1 + 2 * cos(PI / n));
  return 0;
}
