#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
int main() {
  double N, R;
  while (scanf("%lf%lf", &N, &R) != EOF) {
    double AO = R;
    double aph = pi * 0.5 / N;
    double AB = AO * (cos(aph) - sin(aph) / tan(3 * aph));
    double ans = AO * AB * sin(aph) * N;
    printf("%.15f\n", (double)ans);
  }
}
