#include <bits/stdc++.h>
int main() {
  double n, r, x, y, z, len, s;
  scanf("%lf%lf", &n, &r);
  x = acos(-1.0) / (2 * n);
  y = acos(-1.0) / n;
  z = acos(-1.0) - x - y;
  len = r * sin(x) / sin(z);
  s = len * r * sin(y) * n;
  printf("%.8lf\n", s);
  return 0;
}
