#include <bits/stdc++.h>
template <class T>
bool umin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool umax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
using namespace std;
int main(int argc, char **argv) {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.precision(10);
  cout << fixed;
  int n;
  double r;
  cin >> n >> r;
  double pih = acos(0.0);
  double t = sin(2 * pih / n);
  double R = t * r / (1 - t);
  cout << R << endl;
  return 0;
}
