#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, r;
  cin >> n >> r;
  double degc = (360.0 / n) / 2.0;
  double dega = degc / 2.0;
  double degb = 180.0 - dega - degc;
  double b = (sin(degc * 3.141592653589793238462 / 180.0) * r) /
             sin(degb * 3.141592653589793238462 / 180.0);
  double area = 0.5 * sin(dega * 3.141592653589793238462 / 180.0) * b * r;
  cout << fixed << setprecision(20) << area * n * 2 << endl;
  return 0;
}
