#include <bits/stdc++.h>
using namespace std;
struct pt {
  double x, y;
  pt rotate_point(double cx, double cy, double angle) {
    double s = sin(angle);
    double c = cos(angle);
    pt p = {x, y};
    p.x -= cx;
    p.y -= cy;
    double xnew = p.x * c - p.y * s;
    double ynew = p.x * s + p.y * c;
    p.x = xnew + cx;
    p.y = ynew + cy;
    return p;
  }
  pt operator-(pt &other) const { return {x - other.x, y - other.y}; }
  double mag() { return sqrt(x * x + y * y); }
};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  double rad;
  cin >> n >> rad;
  double angle = 2 * acos(-1) / n;
  double l = 0;
  double r = 1000;
  for (int it = 0; it < 80; ++it) {
    double mid = (l + r) / 2;
    int x = 0;
    pt first = {0, rad + mid};
    pt second = first.rotate_point(0, 0, angle);
    double dist = (second - first).mag();
    if (dist < 2 * mid)
      r = mid;
    else
      l = mid;
  }
  cout.precision(10);
  cout << l << endl;
  return 0;
}
