#include <bits/stdc++.h>
using namespace std;
int main() {
  long double n, r;
  cin >> n >> r;
  long double x = ((n - 2) / (2 * n)) * 3.1415926535897;
  long double t = cos(x);
  long double ans = r * t / (1 - t);
  cout << std::setprecision(8) << ans << endl;
}
