#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5, M = 1e18 + 5, OO = 0x3f3f3f3f;
const double pi = 3.141592653589793238462643383279502884;
double n, r;
double calc() {
  double ang = 180 / n;
  ang = (ang / 180) * pi;
  double a = (sin(ang / 2) * r) / sin(pi - (1.5 * ang));
  double ans = n * a * r * sin(ang);
  return ans;
}
int main() {
  cin >> n >> r;
  printf("%.12lf \n", calc());
  return 0;
}
