#include <bits/stdc++.h>
using namespace std;
int main() {
  long long m, R;
  while (cin >> m >> R) {
    long long x = 0, y = 0;
    for (int i = 1; i <= m; i++) {
      x += 2;
      if (i > 1) {
        x += 2;
        y++;
      }
      if (i < m) {
        x += 2;
        y++;
      }
      if (i > 2) {
        long long cnt = i - 2;
        x += cnt;
        y += cnt * 2;
        x += (2 + (cnt - 1) * 2) * cnt / 2;
      }
      if (i < m - 1) {
        long long cnt = m - i - 1;
        x += cnt;
        y += cnt * 2;
        x += (2 + (cnt - 1) * 2) * cnt / 2;
      }
    }
    double res = x * R + (double)sqrt(2.0) * R * y;
    printf("%.6f\n", res / m / m);
  }
  return 0;
}
