#include <bits/stdc++.h>
using namespace std;
int main() {
  long long integer[100010], frac[100010], m, r;
  integer[0] = 2;
  frac[0] = 0;
  integer[1] = 8;
  frac[1] = 2;
  cin >> m >> r;
  for (int i = 2; i < m; ++i) {
    integer[i] = 2 * integer[i - 1] - integer[i - 2] + 4 * (i - 1);
    frac[i] = 2 * frac[i - 1] - frac[i - 2] + 4;
  }
  printf("%.10lf\n",
         (integer[m - 1] + frac[m - 1] * 1.41421356237) * r * 1.0 / (m * m));
  return 0;
}
