#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
const int N = 2e5 + 10;
int main() {
  double n, r;
  cin >> n >> r;
  double pi = acos(0.0) * 2;
  double A = pi / n;
  double B = A / 2;
  double C = pi - A - B;
  double c = r;
  double b = c * sin(B) / sin(C);
  printf("%.15f\n", n * b * c * sin(A));
  return 0;
}
