#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC optimize("fast-math")
#pragma GCC optimize("function-sections")
#pragma GCC optimize("vpt")
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target( \
    "sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
using namespace std;
const long double inf = 1e16;
const long long mod = 1e9 + 7;
const long double fi = (sqrtl(5) + 1) / 2;
const long double eps = 1e-6;
const long double pi = 3.1415926;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long double n, r, a;
  cin >> n >> r;
  a = (pi * (n - 2)) / n;
  long double R = r * (cos(a / 2)) / (1 - cos(a / 2));
  cout << fixed << setprecision(7) << R << '\n';
  return 0;
}
