#include <bits/stdc++.h>
const double PI = acos(-1.0);
int main() {
  double n, r;
  scanf("%lf%lf", &n, &r);
  double p1 = PI / n, p2 = PI / (2 * n), p3 = PI - p1 - p2;
  double l3 = r, l2 = l3 / sin(p3) * sin(p2);
  double s = l3 * l2 * sin(p1);
  printf("%.15f\n", n * s);
  return 0;
}
