#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int t, i, j, n, m, r;
  cin >> m >> r;
  double root = sqrt(2);
  long long m2 = m * m;
  if (m == 1) {
    cout << 2 * r;
    return 0;
  }
  double ans = m + (m - 1) * (2 + root);
  if (m == 2) {
    printf("%0.7lf", (ans * 2 * r) / m2);
    return 0;
  }
  root *= 2;
  ans += (m - 2) * (2 + root);
  if (m == 3) {
    printf("%0.7lf", (ans * 2 * r) / m2);
    return 0;
  }
  for (i = 3; i < m; ++i) {
    ans += (m - i) * ((i - 1) * 2 + root);
  }
  printf("%0.7lf", (ans * 2 * r) / m / m);
  return 0;
}
