#include <bits/stdc++.h>
using namespace std;
double Pi = acos(-1.0);
int main() {
  long long n, r;
  cin >> n >> r;
  double a = 180 * Pi / n / 180;
  double b = 270 * Pi / n / 180;
  double tmp = sin(a) * cos(a);
  double ans = r * r * tmp;
  double l = sin(a) * r;
  double h = l / tan(b);
  ans = ans - l * h;
  ans *= n;
  printf("%.12f\n", ans);
}
