#include <bits/stdc++.h>
using namespace std;
int main() {
  double r, n, R, a1, a2;
  cin >> n >> r;
  a1 = 360 / n;
  a2 = (180 - a1) / 2;
  R = (r * (sin((a1 * 3.1415926) / 180))) /
      ((2 * (sin((a2 * 3.1415926) / 180))) - (sin((a1 * 3.1415926) / 180)));
  printf("%.7lf\n", R);
  return 0;
}
