#include <bits/stdc++.h>
using namespace std;
inline int mul(int a, int b) { return int(a * 1ll * b % 998244353); }
inline int norm(int a) {
  if (a >= 998244353) a -= 998244353;
  if (a < 0) a += 998244353;
  return a;
}
inline int binPow(int a, int k) {
  int ans = 1;
  while (k > 0) {
    if (k & 1) ans = mul(ans, a);
    a = mul(a, a);
    k >>= 1;
  }
  return ans;
}
inline int subtract(int a, int b) { return norm(a - b); }
inline int sum(int a, int b) { return int((a + b) % 998244353); }
inline int inv(int a) { return binPow(a, 998244353 - 2); }
int main() {
  double n, r;
  cin >> n >> r;
  double left = 0;
  double right = 1000000;
  double angle = 360 / n;
  angle = angle * 3.14159265 / 180;
  while (right - left > 0.0000001) {
    double rad = (right + left) / 2;
    double a = r + rad;
    double c = sqrt(2 * a * a - 2 * a * a * cos(angle));
    if (c < 2 * rad) {
      right = rad;
    } else {
      left = rad;
    }
  }
  cout << fixed << setprecision(15) << left;
  return 0;
}
