#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, r;
  cin >> n >> r;
  double ang = 360.0 / n;
  double R =
      r / (sqrt(2 / (1 - cos(ang * 3.1415926535897932384626433 / 180))) - 1);
  cout.precision(10);
  cout << R << '\n';
  return 0;
}
