#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long double a, b, r2, r1, rr;
  long double n, r;
  cin >> n >> r;
  a = 360 / n;
  b = (180 - a) / 2.0;
  r1 = sin(a * 3.14159265 / 180);
  r2 = sin(b * 3.14159265 / 180);
  rr = (r1 * r) / (2 * r2 - r1);
  cout << fixed << setprecision(12) << rr;
}
