#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, r;
  scanf("%d%d", &n, &r);
  double alpha = acos(0) / n;
  double x = (double)r / (2 * cos(alpha) - 1 / (2 * cos(alpha)));
  printf("%.7f\n", sin(alpha) * r * x * n);
  return 0;
}
