#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
int main() {
  double n, r;
  cin >> n >> r;
  double co = cos(2 * pi / n);
  double x = sqrt((1 - co) / 2);
  double rad = r * x / (1 - x);
  cout << fixed << setprecision(7) << rad;
  return 0;
}
