#include <bits/stdc++.h>
using namespace std;
int m;
double R, A[100006];
void init() {
  A[0] = 2;
  A[1] = 2 + sqrt(2);
  for (int i = 2; i < m; i++) A[i] = 2 * (i - 1) + 2 * sqrt(2);
}
int main() {
  scanf("%d%lf", &m, &R);
  init();
  double ans = 0;
  for (int i = 0; i < m; i++) ans += A[i];
  int p1 = 1, p2 = m - 1;
  double last = ans;
  for (int i = 1; i < m; i++) {
    last = last - A[p2] + A[p1];
    ans += last;
    p1++, p2--;
  }
  printf("%lf\n", ans / m / m * R);
  return 0;
}
