#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  const double pi = 3.141592653589793238463;
  double n, r;
  cin >> n >> r;
  double p = 1 - cos(2 * pi / (n));
  double R = r * ((p + sqrt(2 * p)) / ((2 - p)));
  cout << fixed << setprecision(12) << R;
  return 0;
}
