#include <bits/stdc++.h>
using namespace std;
int main() {
  double n, r;
  cin >> n >> r;
  double PI = acos(-1);
  double a = 2 * PI / n;
  double ans = r * sin(a) / (2 * sin((PI - a) / 2) - sin(a));
  cout << fixed << setprecision(7) << ans << "\n";
}
