#include <bits/stdc++.h>
const double PI = acos(-1.0);
int main(void) {
  int n;
  double r;
  scanf("%d%lf", &n, &r);
  double a = 2 * PI / n;
  double ans = 0.5 * n * r * r * sin(a) * sin(a / 4) /
               (cos(a / 2) * sin(PI - a * 3 / 4));
  printf("%.10f\n", ans);
  return 0;
}
