#include <bits/stdc++.h>
using namespace std;
int main() {
  double pi = 3.1415926535;
  double r, n;
  cin >> n >> r;
  double ans, d;
  d = (n - 2) / n * pi;
  d /= 2;
  ans = r * cos(d) / (1 - cos(d));
  cout << fixed << setprecision(7) << ans << endl;
  return 0;
}
