#include <bits/stdc++.h>
using namespace std;
struct T {
  int x, y;
};
T t = {1, 2};
double pi = acos(-1);
const int ma = 2 * 131072;
double n, r, ans, a, b, c;
int main() {
  iostream::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> r;
  a = pi / n;
  b = pi / (2. * n);
  cout.precision(30);
  cout << n * r * r * sin(a) * sin(b) / (sin(pi - a - b)) << endl;
  return 0;
}
