#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  double m, R, res[100005], tmp = 0;
  cin >> m >> R;
  res[0] = 2;
  res[1] = 2 + sqrt(2);
  for (int i = 2; i <= 100000; i++) res[i] = 2 * (i - 1) + 2 * sqrt(2);
  tmp += m * res[0];
  if (m == 1)
    printf("%.9lf", R * tmp);
  else {
    for (int i = 1; i <= m - 1; i++) {
      tmp += 2 * (m - i) * res[i];
    }
    printf("%.9lf\n", R * tmp / (m * m));
  }
  return EXIT_SUCCESS;
}
