#include <bits/stdc++.h>
using namespace std;
double n, r, pi, a, b, c;
int main() {
  cin >> n >> r;
  pi = acos(-1.0), a = pi * 1.0 / n, b = pi * 1.0 / (2 * n), c = pi - a - b,
  a = sin(a) * (r / sin(c)),
  cout << setprecision(7) << fixed << a * r * sin(b) * n;
  return 0;
}
