#include <bits/stdc++.h>
using namespace std;
void ti() {}
int main() {
  ti();
  int n, r;
  cin >> n >> r;
  double x = sin((double)3.14159265 / n);
  double r1 = (double)(r * (x + 1)) / (1 - x);
  cout << setprecision(8) << (r1 - r) / 2.0 << endl;
  return 0;
}
