#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t, i, j, x = 0, y, q, n, z, l, k, r, ans = 0, m;
  cin >> n >> r;
  long double angle = (long double)3.1415926536 / n;
  long double xx = (long double)r * (sin(angle)) * (1 + sin(angle));
  xx /= (cos(angle)) * (cos(angle));
  cout << fixed << setprecision(9) << xx;
}
