#include <bits/stdc++.h>
using namespace std;
long double PI, n, r, ans;
int main() {
  cin >> n >> r;
  PI = acos(-1.0);
  ans = n / (1 / tan(PI / (2 * n)) + 1 / tan(PI / n)) * r * r;
  cout << fixed << setprecision(10) << ans << endl;
}
