#include <bits/stdc++.h>
using namespace std;
int main() {
  double phi = acos(-1);
  double n, r;
  scanf("%lf %lf", &n, &r);
  double du = phi * 2.0 / n;
  double du2 = (phi - du) / 2.0;
  double s1 = sin(du), s2 = sin(du2);
  printf("%.7lf\n", r * s1 / (2.0 * s2 - s1));
  return 0;
}
