#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
int main() {
  ios::sync_with_stdio(0);
  long long n, r;
  cin >> n >> r;
  double area = (double)n * r * r;
  area /= (1.0 / tan(PI / (2 * n)) + 1.0 / tan(PI / n));
  cout << fixed << setprecision(9) << area;
  return 0;
}
