#include <bits/stdc++.h>
using namespace std;
const int MAX = 100007;
const int MOD = 1000000007;
void solve() {
  int n, r;
  cin >> n >> r;
  cout << fixed << setprecision(17)
       << sin((acos(-1) / n) / 2) * r * r /
              sin(acos(-1) - 1.5 * (acos(-1) / n)) * sin((acos(-1) / n)) * n;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  solve();
}
