#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100030;
const long long MODD = 1000000009;
const long double PI = acos(-1.0);
void do_case() {
  long long n, r;
  cin >> n >> r;
  long double A = PI / n, B = PI / (2 * n), C = PI * (2 * n - 3) / (2 * n);
  cout << fixed << setprecision(10);
  long double c = r;
  cout << n * (c * c * sin(B) * sin(A)) / sin(C) << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  do_case();
  return 0;
}
