#include <bits/stdc++.h>
using namespace std;
const long double Pi =
    3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679;
int main() {
  cout << fixed;
  long double n, r, a, s;
  cin >> n >> r;
  a = Pi / n;
  long double t1 = tan(a / 2);
  long double t2 = tan(a);
  s = r / 2.0 / (t1 + t2) * r * t1 * t2;
  cout << setprecision(7) << s * n * 2;
}
