#include <bits/stdc++.h>
using namespace std;
const int maxn = 100100;
const unsigned long long inf = (1LL << 60 - 1);
int main() {
  int n, r;
  cin >> n >> r;
  double sb = sin(acos(-1) / n);
  double sr = sin(acos(-1) / (2 * n));
  double sa = sin((2 * n - 3) * acos(-1) / (2 * n));
  double ans = (double)n * r * r * sr * sb / sa;
  printf("%.10lf\n", ans);
  return 0;
}
