#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
int main() {
  double n, r;
  cin >> n >> r;
  double s = cos((n - 2) * PI / (2 * n));
  printf("%.7lf", r * s / (1 - s));
  return 0;
}
