#include <bits/stdc++.h>
double PI = 3.14159265358979;
int main() {
  double n, r;
  scanf("%lf%lf", &n, &r);
  double x = r * sin(PI / (2.0 * n)) / sin(3.0 * PI / (2.0 * n));
  printf("%.12f", n * r * x * sin(PI / n));
}
