#include <bits/stdc++.h>
using namespace std;
long long sqr(long long x) { return x * x; }
long double sqrd(long double x) { return x * x; }
mt19937 Random((int)time(0));
long long rnd(long long x) { return Random() % x; }
const long long INF = (long long)1e9 + 282;
const long long MOD = (long long)1e9 + 7;
const long double PI = acosl(-1.0);
void mane() {
  int n, R;
  cin >> n >> R;
  long double c = cosl(2 * PI / n);
  long double l = 0, r = INF;
  for (int i = 0; i < 100; i++) {
    long double m = (l + r) / 2;
    if (4 * m * m > 2 * sqrd(R + m) * (1 - c)) {
      r = m;
    } else {
      l = m;
    }
  }
  cout << r;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout.setf(ios_base::fixed, ios_base::floatfield);
  cout.precision(12);
  mane();
}
