#include <bits/stdc++.h>
using namespace std;
int main() {
  double k, r;
  scanf("%lf%lf", &k, &r);
  double a = acos(-1.0) / (2.0 * k);
  double b = acos(-1.0) / (1.0 * k);
  double g = acos(-1.0) - a - b;
  printf("%.12lf\n", sin(a) * sin(b) * k * r * r / sin(g));
  return 0;
}
