#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, r, ans;
  cin >> n >> r;
  ans = (n * r * r * sin(3.141592654 / n) * sin(3.141592654 / (2 * n))) /
        sin((3 * 3.141592654) / (2 * n));
  cout << setprecision(12) << ans << endl;
  return 0;
}
