#include <bits/stdc++.h>
int main() {
  double ans = 0, R, t;
  double dis[100005], s[100005];
  int m, i, tmp;
  scanf("%d %lf", &m, &R);
  dis[0] = 2.0 * R;
  dis[1] = 2.0 * R + sqrt(2.0) * R;
  dis[2] = 2.0 * R + 2 * sqrt(2.0) * R;
  for (i = 3; i < m; i++) {
    dis[i] = dis[i - 1] + 2.0 * R;
  }
  s[0] = dis[0];
  for (i = 1; i < m; i++) {
    s[i] = s[i - 1] + dis[i];
  }
  for (i = 1; i <= m; i++) {
    t = s[i - 1] + s[m - i] - dis[0];
    t /= (double)(m);
    ans += t;
  }
  ans /= (double)m;
  printf("%.10f\n", ans);
}
