#include <bits/stdc++.h>
using namespace std;
int main() {
  long double n, r;
  cin >> n >> r;
  cout << setprecision(15)
       << n * r * r / ((1.0 / tanl(M_PI / (2.0 * n))) + (1.0 / tanl(M_PI / n)));
  return 0;
}
