#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.14159265358979323;
const double EPS = 1e-12;
const int N = 1e6 + 5;
const int mod = 998244353;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, r;
  cin >> n >> r;
  long double angle = (pi * (n - 2)) / (2 * n);
  long double cs = cos(angle);
  cout << setprecision(9) << r * cs / (1 - cs);
  return 0;
}
