#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
using namespace std;
int main() {
  unsigned long long n, r;
  scanf("%lld", &n);
  scanf("%lld", &r);
  long double a;
  a = (1 / (1 / tan(3.1415926535897932384626433832795 / (2 * n)) +
            1 / tan(3.1415926535897932384626433832795 / n)));
  a = n * a;
  a *= r * r;
  printf("%.12Lf\n", a);
}
