#include <bits/stdc++.h>
using namespace std;
inline void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
}
int main() {
  fast();
  double n, r;
  cin >> n >> r;
  double cosT = cos(((n - 2) * 3.141592653589 / 2) / n);
  double ans = (r * cosT) / (1 - cosT);
  cout << fixed << setprecision(8) << ans << endl;
}
