#include <bits/stdc++.h>
int main() {
  double n, r, PI;
  PI = acos(-1);
  while (~scanf("%lf%lf", &n, &r)) {
    printf("%.16lf\n", n * r * r * sin(PI / 2.0 / n) * sin(PI / n) /
                           sin((2 * n - 3) * PI / 2.0 / n));
  }
  return 0;
}
