#include <bits/stdc++.h>
using namespace std;
double n, r;
const double PI = 3.1415926535;
int main() {
  cin >> n >> r;
  double now = 0;
  double q1 = 90, q2 = 180;
  now = q2 / n;
  now = now / q2 * PI;
  double t1 = sin(now) / cos(now);
  now = q1 - q2 / n;
  now = now / 2;
  now = now / q2 * PI;
  double t2 = sin(now) / cos(now);
  double ans = r * (t1 / t2);
  printf("%.7llf", ans);
}
