#include <bits/stdc++.h>
using namespace std;
struct timer {
  time_t start;
  timer() { start = clock(); }
  ~timer() {
    cerr << 1. * (clock() - start) / CLOCKS_PER_SEC << " secs" << endl;
  }
};
long long m, R;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> m >> R;
  double ans = 0;
  for (long long i = 0; i < (m); i++) {
    if (i == 0) {
      ans += 2 * m;
    } else if (i == 1) {
      ans += (2 + sqrt(2)) * (m - 1) * 2;
    } else {
      ans += (i * 2 - 2 + 2 * sqrt(2)) * (m - i) * 2;
    }
  }
  cout << setprecision(16) << ans / m / m * R;
}
