#include <bits/stdc++.h>
using namespace std;
const double pi = 3.14159265;
int main() {
  double degree, radian, x, y;
  int n, R;
  cin >> n >> R;
  degree = 360.0 / n;
  radian = degree * pi / 180.0;
  cout << setprecision(8);
  x = cos(radian);
  y = 2.0 / (1 - x) * 1.0;
  x = sqrt(y * 1.0);
  y = (R * 1.0) / (x - 1) * 1.0;
  cout << y;
}
