#include <bits/stdc++.h>
using namespace std;
int m, R;
void solve(int tc) {
  cin >> m >> R;
  double ans = 1.0 * 2 * R * m;
  for (int i = 1; i < m; i++) {
    double num = 1.0 * 2 * (m - i);
    if (i == 1)
      ans += 1.0 * R * (2 + sqrt(2)) * num;
    else
      ans += 1.0 * R * (2 * (i - 1) + 2 * sqrt(2)) * num;
  }
  ans /= (1.0 * m * m);
  printf("%.9f\n", ans);
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int tc = 1;
  for (int t = 1; t <= tc; t++) solve(t);
  return 0;
}
