#include <bits/stdc++.h>
int main() {
  double n, r;
  scanf("%lf%lf", &n, &r);
  double a = atan(1) * 2 / n;
  printf("%.10f\n", r * r * n * sin(2 * a) * sin(a) / sin((n * 2 - 3) * a));
  return 0;
}
