#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, r;
  cin >> n >> r;
  double each = ((n - 2) * 180) / n;
  double a1, b;
  a1 = each / 2;
  b = 180 - each;
  a1 = a1 * 3.14159265358979323846 / 180;
  b = b * 3.14159265358979323846 / 180;
  cout << fixed << setprecision(7) << (r * sin(b)) / (2 * sin(a1) - sin(b))
       << endl;
  return 0;
}
