#include <bits/stdc++.h>
using namespace std;
int main() {
  long double n, r, A, B, c;
  cin >> n >> r;
  A = M_PI / n;
  B = A / 2;
  c = r * tanl(A) * r * tanl(B) / (tanl(A) + tanl(B)) * n;
  cout << fixed << setprecision(12) << c << endl;
  return 0;
}
