#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f, mod = 1000000007;
const double eps = 1e-10, pi = acos(-1.0);
namespace geometry {
struct point {
  double x, y;
  point(double a = 0, double b = 0) : x(a), y(b) {}
};
int fcmp(double val) {
  if (abs(val) < eps)
    return 0;
  else
    return val > 0 ? 1 : -1;
}
point operator+(const point &A, const point &B) {
  return point(A.x + B.x, A.y + B.y);
}
point operator-(const point &A, const point &B) {
  return point(A.x - B.x, A.y - B.y);
}
point operator*(const point &A, const double &p) {
  return point(A.x * p, A.y * p);
}
point operator/(const point &A, const double &p) {
  return point(A.x / p, A.y / p);
}
bool operator==(const point &A, const point &B) {
  return !fcmp(A.x - B.x) && !fcmp(A.y - B.y);
}
bool operator<(const point &A, const point &B) {
  return fcmp(A.x - B.x) < 0 || (!fcmp(A.x - B.x) && fcmp(A.y - B.y) < 0);
}
double dot(point A, point B) { return A.x * B.x + A.y * B.y; }
double cross(point A, point B) { return A.x * B.y - A.y * B.x; }
double length(point A) { return sqrt(dot(A, A)); }
double angle(point A, point B) {
  return acos(dot(A, B) / length(A) / length(B));
}
double dis(point A, point B) {
  return sqrt((A.x - B.x) * (A.x - B.x) + (A.y - B.y) * (A.y - B.y));
}
point rotate(point A, double rad) {
  return point(A.x * cos(rad) - A.y * sin(rad),
               A.x * sin(rad) + A.y * cos(rad));
}
point VectorLineIntersection(point P, point v, point Q, point w) {
  point u = P - Q;
  double t = cross(w, u) / cross(v, w);
  return P + v * t;
}
}  // namespace geometry
using namespace geometry;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') f = -1;
  for (; ch >= '0' && ch <= '9'; ch = getchar())
    x = (x << 1) + (x << 3) + ch - '0';
  return x * f;
}
int main() {
  double n, r;
  scanf("%lf%lf", &n, &r);
  point A, B, C, D, E;
  B.x = r;
  C = rotate(B - A, pi / n);
  D = rotate(A - B, -pi / 2 / n);
  E = VectorLineIntersection(A, C, B, D);
  double S = cross(B - A, E - A);
  printf("%.10f", S * n);
  return 0;
}
