#include <bits/stdc++.h>
using namespace std;
int main() {
  double r, n;
  cin >> n >> r;
  double ans =
      n * r * r / (1.0 / tan(acos(-1) / (n * 2.0)) + 1.0 / tan(acos(-1) / n));
  cout << fixed << setprecision(12) << ans << endl;
}
