#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, r;
  cin >> n >> r;
  double alpha = 90.0 - 180.0 / n;
  double val = cos(alpha * 3.14159265 / 180.0);
  double ans = val * (double)r / (1 - val);
  cout << fixed << setprecision(6) << ans << endl;
  return 0;
}
