#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, r;
  cin >> n >> r;
  long double x = n * pow(r, 2.0);
  long double y1 = 1 / (tan(3.14159265 / (2 * n)));
  long double y2 = 1 / (tan(3.14159265 / n));
  long double ans = x / (y1 + y2);
  cout << setprecision(12) << ans << endl;
  return 0;
}
