#include <bits/stdc++.h>
using namespace std;
const int inf = (long long)1e9;
const int mod = inf + 7;
const double pi = acos(-1.0);
double n, r;
int main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> r;
  double an = 2.0 * pi / n;
  double bn = (pi - an) / 2.0;
  an /= 2.0;
  bn /= 2.0;
  double x = tan(an) * r;
  double ans = x / tan(bn);
  printf("%.10f", ans);
  return 0;
}
