#include <bits/stdc++.h>
using namespace std;
int main() {
  double N, R;
  const long double PI = acos(-1);
  cin >> N >> R;
  double cosine = cos(2 * PI / N);
  double x = sqrt((1 - cosine) / 2);
  double radius = R * x / (1 - x);
  cout << fixed << setprecision(12) << radius;
}
