#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, r;
  cin >> n >> r;
  double x = 2.0 * 3.14159265359 / (1.0 * n);
  double y = sqrt(2.0 - 2 * cos(x));
  cout << setprecision(10) << (1.0 * r) * y / (2.0 - y);
  return 0;
}
