#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, r;
  cin >> n >> r;
  double A = 2 * acos(-1) / n;
  double B = A / 4;
  double C = acos(-1) - A / 2 - B;
  double a = 1.0 * r / sin(C) * sin(A / 2);
  double b = a / sin(A / 2) * sin(B);
  printf("%0.8lf\n", sin(C) * b * a * n);
}
