#include <bits/stdc++.h>
using namespace std;
const double rad2 = 1.414213562373095;
int m;
double Dist, R, a[100005], s[100005];
int main() {
  scanf("%d %lf", &m, &R);
  a[1] = 2.0 * R, a[2] = 2.0 * R + rad2 * R, a[3] = 2.0 * R + 2.0 * rad2 * R;
  for (int i = 4; i <= m; ++i) a[i] = a[i - 1] + 2.0 * R;
  for (int i = 1; i <= m; ++i) s[i] = a[i] + s[i - 1];
  for (int i = 1; i <= m; ++i) Dist += (double)(s[m - i + 1] + s[i] - a[1]) / m;
  double ans = Dist / m;
  printf("%.12lf\n", ans);
  return 0;
}
