#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, r;
  double x;
  cin >> n >> r;
  x = 1.0 * n * r * r * sin(3.1415926535897932384 / n) *
      sin(3.1415926535897932384 / (2 * n)) /
      sin(3 * 3.1415926535897932384 / (2 * n));
  printf("%.12f", x);
  return 0;
}
