#include <bits/stdc++.h>
using namespace std;
template <typename T1, typename T2>
istream& operator>>(istream& in, pair<T1, T2>& a) {
  in >> a.first >> a.second;
  return in;
}
template <typename T1, typename T2>
ostream& operator<<(ostream& out, pair<T1, T2> a) {
  out << a.first << " " << a.second;
  return out;
}
template <typename T, typename T1>
T amax(T& a, T1 b) {
  if (b > a) a = b;
  return a;
}
template <typename T, typename T1>
T amin(T& a, T1 b) {
  if (b < a) a = b;
  return a;
}
const long long INF = 1e18;
const int32_t M = 1e9 + 7;
const int32_t MM = 998244353;
const long long N = 0;
const double pi = acos(-1);
void solve() {
  long long n, r;
  cin >> n >> r;
  double t = 2 * pi / n;
  double ct2 = cos(t / 2), st2 = sin(t / 2), ct = cos(t), st = sin(t);
  double base = 2 * r * st2, height = r * ct2;
  double x1 = -height, y1 = -base / 2;
  double x2 = r * ct, y2 = r * st;
  double x = x1 - y1 * (x2 - x1) / (y2 - y1);
  x = abs(x);
  cout << setprecision(12);
  cout << fixed;
  cout << n * base * x / 2;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) solve();
  return 0;
}
